Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update subform lookup field- Access97

Status
Not open for further replies.

rjpeters

Programmer
Jul 17, 2001
5
AU
I have a subform with a lookup field (a couple actually) but if the actual lookup is missing (eg. a new composer)
I have to add it to that table first _ can do that.
My problem is that I cannot update the subform - it complains that I must save it first, but I cannot because required fields are still blank. I suppose I can add some default data to the required fields, save the record/subform, then reopen it and remove the incorrect data. This seems like a very roundabout to do it.
Is there a better way?
- Russell
 
Hi, Russell!

For actualizing of subform, combobox,listbox recordset you may requery them.

me.subForm.Form.requery
me.lstListBox.requery
me.cboComboBox.requery

Aivars

 
Thanks, I retried that and have finally got it. The secret was I had change it's text to a previously valid entry so it could be saved before requerying.
There is a possibility of it reentering the notinlist handler if I don't correctly add the proper entry but I will try to stop that when I get around to it.
- Russell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top