refresh form after data entered into another form

D

deb

I have a form called f000Score, It has a cboSite that if not in list it
opens another form (fSiteNotInList) to enter the data.
After the data is entered and I close the fSiteNotInList form, the f000Score
cboSite is not updated with the data that was just entered.

How can I refresh my cboSite on f000Score form after data is entered into
the fSiteNotInList form?

Thanks
 
D

Dirk Goldgar

deb said:
I have a form called f000Score, It has a cboSite that if not in list it
opens another form (fSiteNotInList) to enter the data.
After the data is entered and I close the fSiteNotInList form, the
f000Score
cboSite is not updated with the data that was just entered.

How can I refresh my cboSite on f000Score form after data is entered into
the fSiteNotInList form?


In the NotInList event procedure, you need to open the fSiteNotInList form
in dialog mode, and then set the event procedure's Response argument to
acDataErrAdded. For example:

'----- start of example code -----
Private Sub cboSite_NotInList(NewData As String, Response As Integer)

DoCmd.OpenForm "fSiteNotInList", WindowMode:=acDialog

Response = acDataErrAdded

End Sub

'----- end of example code -----
 
D

deb

does exactly what I needed!!

--
deb


Dirk Goldgar said:
In the NotInList event procedure, you need to open the fSiteNotInList form
in dialog mode, and then set the event procedure's Response argument to
acDataErrAdded. For example:

'----- start of example code -----
Private Sub cboSite_NotInList(NewData As String, Response As Integer)

DoCmd.OpenForm "fSiteNotInList", WindowMode:=acDialog

Response = acDataErrAdded

End Sub

'----- end of example code -----

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
 

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