I have a db that I used the FP2000 Database Interface Wizard on. All is well and it lets me view/update/delete fields from the db. (not a problem).
When I generated it, though, it had me choose how many fields would be in my drop-down boxes and named each choice "Option 1", "Option 2", etc. (still not a problem!)
On the forms, I edited the generic options to match the ones in my db and it worked well. (even still not a problem!)
However, on the "update" form, it will go to the db and look at the record I want to edit and populate the fields with its data -- so when I click "edit" I can see what the data for each field is and submit a change, if necessary. (still good so far...)
For the drop-down boxes, though, it will show all of the choices, but will not show which "option" was selected in the record. It defaults to the first "option" (which may/may not be correct) and before I submit the form, I have to drop down each of the drop-down boxes and re-select the correct "option", even though it may have already been correct in the original record. (?!)
Do I confuse? I've provided the code (that had generic info in it and I edited). -- Is there some way to have it check the original record in the db and return the "option" that was selected -- so I could choose to edit it or not? (??)
EXAMPLE: db field = status
drop-down box choices = new, closed
<select size="1" name="Status">
<option <% if "New" = FP_Field(fp_rs,"Status" then %> selected <% end if %> value="New">New</option>
<option <% if "Closed" = FP_Field(fp_rs,"Status" then %> selected <% end if %> value="Closed">Closed</option>
</select>
Am I way off base?
Any clues/answers you could give me would be *greatly* appreciated!
~asp newbie, but trying!
When I generated it, though, it had me choose how many fields would be in my drop-down boxes and named each choice "Option 1", "Option 2", etc. (still not a problem!)
On the forms, I edited the generic options to match the ones in my db and it worked well. (even still not a problem!)
However, on the "update" form, it will go to the db and look at the record I want to edit and populate the fields with its data -- so when I click "edit" I can see what the data for each field is and submit a change, if necessary. (still good so far...)
For the drop-down boxes, though, it will show all of the choices, but will not show which "option" was selected in the record. It defaults to the first "option" (which may/may not be correct) and before I submit the form, I have to drop down each of the drop-down boxes and re-select the correct "option", even though it may have already been correct in the original record. (?!)
Do I confuse? I've provided the code (that had generic info in it and I edited). -- Is there some way to have it check the original record in the db and return the "option" that was selected -- so I could choose to edit it or not? (??)
EXAMPLE: db field = status
drop-down box choices = new, closed
<select size="1" name="Status">
<option <% if "New" = FP_Field(fp_rs,"Status" then %> selected <% end if %> value="New">New</option>
<option <% if "Closed" = FP_Field(fp_rs,"Status" then %> selected <% end if %> value="Closed">Closed</option>
</select>
Am I way off base?
Any clues/answers you could give me would be *greatly* appreciated!
~asp newbie, but trying!