Save only 3 of 4 fields

mestst64

Registered User.
Local time
Today, 02:56
Joined
Mar 6, 2006
Messages
22
I have a form with 4 combo boxes. Box 1 is linked to a unique indexed field of my main table and does not allow duplicates.

Is there a way I can enter selections in the other 3 boxes and save only those 3? (these do not add data, but edit an existing row in the main table)

Experimenting, I found that if I didn't make a selection in Box 1, I could still make selections in the other 3, close (save) the form, and it would make those 3 edits in the table row belonging to the value that was in Box 1.

This is kind of what I want, except that there are many selections in Box 1, and if I select one of them and close (save) the form, I get an error message that a duplicate entry will be made?

Would a possible solution be to have Box 1 on a main form and the other 3 on a subform? If so, how do I set this up? Or is there another way to relate the other 3 boxes to Box 1, and only save the 3.
 
Remove the first combo. Then add it again. The wizard will walk you through the process. Choose the option that says to find a record for this form.

If you want to use the form to both add and change records, you need a textbox where a value for the first combo can be entered as well as the unbound combo that is used to find existing records. You can hide the textbox and only display it when the user is adding a new record by placing code similar to the following in the form's Current event.

Code:
If Me.NewRecord Then
    Me.cmbFirst.Visible = True
Else
    Me.cmbFirst.Visible = False
End If
 

Users who are viewing this thread

Back
Top Bottom