Edit Record, Display Select Box with Prev Selected

Results 1 to 2 of 2

Thread: Edit Record, Display Select Box with Prev Selected

  1. #1
    Andrew Brown Guest

    Default Edit Record, Display Select Box with Prev Selected

    Thanks if you are reading this..!<BR><BR>I am building a select box from a string of values in a single SQL field,.. ie "NT, Netware, Unix, Linux"<BR>Then, storing the selected values in a single field in another table .. ie selected options were "NT, UNIX"<BR>Problem is that to then allow an edit of the record, I need to show the records that were selected, PLUS the the other options.. all of the options.<BR>Cant get my head around how to do this.. either store all values in the second table, and somehow mark those that were selected??<BR>Not very nice when you come to export the data ?<BR><BR>PS&#062;. raining in Sydney..!<BR><BR>Andrew

  2. #2
    Join Date
    Dec 1969

    Default RE: Edit Record, Display Select Box with Prev Sele

    Most people on this site will tell you that putting multiple values in a single field is bad db design and would recommend that you put them each in their own record with a one to many relationship, then what you are asking would be alot simpler<BR><BR>What I have done in the past is say <BR><BR>3 tables<BR><BR>one to many relationship on UserID&#039;s of table 1 and Table 2<BR><BR>Table 1 User<BR>UserID P-Key etc...<BR><BR><BR>Table 2 UserSoftware<BR>ID P-Key<BR>UserID<BR><BR>Table 3<BR><BR>Software<BR>SoftwareID P-Key<BR>Software<BR><BR>Then on my form that the user selected the software type I did not use a select box, I dynamically created a list of checkboxes all (with the same name but the values where set to the software ID) <BR>where the items from the software table that the user had already selected where checked and the other ones where not<BR><BR>Then if the users checked another item I just looped through the checkbox(array) and did another insert Where UserID and Software Id where not alraedy in the list.<BR><BR>Hope that helps <BR><BR><BR><BR>

Posting Permissions

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