[RESOLVED] bind control object into database tables
Hello there,
i'm working on a project which nature requires me to store control objects into database table. i haven't got any idea if this is feasible.
i.e, storing a checkbox object as a particular field in the table.
i've came across a ppt slide under 'group control' mentioning 'can bind control to a field in a table and store it or use for calculations on a form'
unfortunately, the infomation seems rather ambiguous to me.
please feel free to discuss or enlighten.
thank you very much.
Astro
Re: bind control object into database tables
Quote:
Originally Posted by Astro
Hello there,
i'm working on a project which nature requires me to store control objects into database table. i haven't got any idea if this is feasible.
i.e, storing a checkbox object as a particular field in the table.
i've came across a ppt slide under 'group control' mentioning 'can bind control to a field in a table and store it or use for calculations on a form'
unfortunately, the infomation seems rather ambiguous to me.
please feel free to discuss or enlighten.
thank you very much.
Astro
If you are going to bind a table to a checkbox the field to which it is bound to has to be a Yes/No Field Type, otherwise the control can't be bound and you will need some VB in order to save the data to a table:
VB Code:
Private Sub Check1_Click()
Dim strCheckValue as String
If Me.Check1.Value = 0 Then
strCheckValue = "NO"
Else
strCheckValue = "YES"
End If
Me.Text1 = strCheckValue
End Sub
in the above example the bound field would be Me.Text1. I hope this clears it up a little bit. :)
Re: bind control object into database tables
Hey Mark_Gambo,
Although it isn't totally what i'm expecting, your help actually fits in to another part of my application. =) The checkbox issue is now settled by a school-mate. I'll have him look at your post! Appreciate your reply.
Thank You
Astro