Results 1 to 3 of 3

Thread: [RESOLVED] bind control object into database tables

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2005
    Posts
    90

    Resolved [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

  2. #2
    Giants World Champs!!!! Mark Gambo's Avatar
    Join Date
    Sep 2003
    Location
    Colorado
    Posts
    2,965

    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:
    1. Private Sub Check1_Click()
    2. Dim strCheckValue as String
    3.  
    4.      If Me.Check1.Value = 0 Then
    5.           strCheckValue = "NO"
    6.      Else
    7.           strCheckValue = "YES"
    8.      End If
    9.  
    10. Me.Text1 = strCheckValue
    11. End Sub

    in the above example the bound field would be Me.Text1. I hope this clears it up a little bit.
    Regards,

    Mark

    Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."


  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jun 2005
    Posts
    90

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width