PDA

Click to See Complete Forum and Search --> : [RESOLVED] bind control object into database tables


Astro
Aug 17th, 2005, 10:13 PM
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

Mark Gambo
Aug 18th, 2005, 02:44 PM
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:

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. :)

Astro
Aug 24th, 2005, 08:26 PM
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