How to save the values entered into the combo boxes?

G

Guest

I am able to make the cascading combo boxes, but I don't know how to save the
values that the user entered; i.e., Dept and Course. Also, I'd like those
values show up when the user wants to review a specific record or she/he
wants to go back to that record on the opened form.

In addition, after I entered the values of Dept and Course into the two
combo boxes, I move to the next record. The next record will show the
selected values on the combo boxes from the first one. I would like they are
blank so the user would enter the new values for the second record, and so on.
How can I do that? Thank you very much for your help.
Tim
 
J

Jeff Boyce

Tim

From the behavior you're describing, I'll guess that the combo boxes are NOT
bound to the underlying field(s) in your form's record source.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
G

Guest

Hi Jeff,
So how can I retain the values to display them in the combo boxes and store
in the table. I try to bound to fields in the form's record source but it
still does not show up. Any help would be greatly appreciated.
Thanks,
tim
 
J

Jeff Boyce

Tim

How are you trying to bind the combo box to the form's source?

A standard way of designing a form where one of the fields in the underlying
table needs to be consistent (e.g., state name abbreviations) is to use a
combo box.

The combo box could be based on a table of state name abbreviations (this
provides the only valid abbreviations). The combo box could have the
LimitToList property set to Yes. The combo box could have the Control
Source field set to the underlying table's field that holds State Name
Abbreviation (this is NOT the same table as the list of abbreviations).

With a design like this, you can open the form for data entry, add a new
record, pick a state name abbreviation from the combo box, and it will add
it to the underlying table/record. You can find an existing record and see
what state name abbreviation was selected for that record. You can edit
that record and change/correct the state name abbreviation.

Does this match what you're doing?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
G

Guest

Hi Jeff:
Yes, what I am doing matches what you describe. In the combo box's Control
Source, I set to the underlying tables' field. A little different way is I
set Entry Data property of the form to No, but Allow Edit, Allow Delete, etc.
to Yes. That's way, I can be able to view selected data as well as modifying
data.

Thank you,
Tim
 
J

Jeff Boyce

Tim

I'm not sure what's (not) working with your form. Perhaps one of the other
newsgroup readers will be able to offer a suggestion.

If this were mine, I'd probably start over with a new form and see if the
same problem happened again. After saving a backup of the original, of
course! And after saving the original backup, trying Compact & Repair, just
in case...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top