Results 1 to 3 of 3

Thread: [RESOLVED] [2005] Selecting value x (say 3rd) from several fields...

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2007
    Posts
    4

    Resolved [RESOLVED] [2005] Selecting value x (say 3rd) from several fields...

    OK. I did this in Notes, but I am not having any luck finding help in VB. Maybe it's just too late because I couldn't veen think of a decent way to say this to search in MSDN, everything I have tried so far hasn't produced results.

    I have 3 fields, each to contain a list. They are ChildsName, ChildsDOB, ChildsGender. They are fields in a contact database table. If a person has multiple children I would rather simply create a list where each field contains each entry's information as the first, second, third etc, item in the list.

    Again, perhaps it's late, but I am drawing a blank on this one, even how to start in VB.

    TIA

    Regards,

    joe

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2005] Selecting value x (say 3rd) from several fields...

    Creating composite fields like that is a bad idea and leads to headaches like the one you have now. You should have a table for Children and each record has a foreign key relationship to the parent record. It's also impossible to have a list of binary date objects in one field, so you would have to commit the crime of storing dates as text rather than binary date objects.

    If you must have composite fields then you would need to get the text from the field into a String and then split it on the delimiters into a String array, from which you can then get the appropriate value.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2007
    Posts
    4

    Re: [2005] Selecting value x (say 3rd) from several fields...

    OK. So it wasn't just me then...lol. I thought there would be a reason I wasn't getting anywhere, Thanks

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