refresh form after data entered into another form

  • Thread starter Thread starter deb
  • Start date Start date
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
 
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 -----
 
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)
 
Back
Top