Forums
 This topic is locked 
             Help with an Update form
 Posted 26 Feb 2003  23:38:39 
  1 
     has   voted 
  26 Feb 2003  23:38:39 Jim Van Scoyk posted: 
 I've created a form that uses some drop down menus to select the data so it's formatted properly in the database. The drop down menus pull their content from tables in a database. It inserts records fine in a SQL 2000 table. Now I want to create another form to Update a record in that same database that the record was inserted previously. The problem I am having is that I want to do one of 2 things. One would be to have to same drop down menu as the insert menu with the default value being what was previously entered in the insert form. If you don't select a different value in the drop down then the data remains unchanged. Another thing I thought I could do would be to just display the value that is already in the field and have a drop down next to it to select a different value if you want.
The problem I am having is that if you do not select a different value on the drop down then it updates the record with a null value in that field.
I hope this makes sense. Does anyone have any ideas how I could use a drop down menu to update a field like I described above?
Jim
Replies
 Replied 18 Mar 2003  03:19:41 
   18 Mar 2003  03:19:41 Dave Blohm replied: 
  post the code in question and Ill take a look...
Doc
Rangewalk Digital Studios
  Doc
Rangewalk Digital Studios
 Replied 18 Mar 2003  20:59:23 
   18 Mar 2003  20:59:23 johan tessens replied: 
  This might work
1 insert in your form a hidden field. Use the same name as for your list item. Set the value to the value of the previously inserted value. So the empty value is ignored.
2 But the best solution (if possible in your case) is to set the <b>initially selected</b> value to the last inserted value
  1 insert in your form a hidden field. Use the same name as for your list item. Set the value to the value of the previously inserted value. So the empty value is ignored.
2 But the best solution (if possible in your case) is to set the <b>initially selected</b> value to the last inserted value
