Looking for field value when I'm exiting form

  • Thread starter Thread starter SimonDeLikeable
  • Start date Start date
S

SimonDeLikeable

Hi
Access 2000 on Windows XP. I have a form used to take Bookings for
cranes. So the user selects a Customer. Then the user is to pick a Site for
that Customer. The Sites are already setup - each Customer can have many
sites. I've stored the Sites on a list box, and the rowsource is a query as
follows:

SELECT Sites.SiteID, Sites.SiteDescrip FROM Sites WHERE
(((Sites.SiteAccNumber)=[Forms]![frmBooking]![Book_CustID]));

So on my Customer Update event, and on the on current event of my form, I
have code that does lisSite.requery
Now all is well until the form is closed. Then up pops an input box, "Please
enter parameter value: [Forms]![frmBooking]![Book_CustID]"

Now I can get around this by using the On Close event of the form to set
Me.lisSite.RowSource = "".
Is this the right way to do it? Or is there a better way?
Also, I've used this method of restriciting combo and list boxes before, and
I never saw any problems. Is this a "feature" of XP?
Thanks
Diarmuid
 
Hello,

You can send mail to me at (e-mail address removed) directly . I will send
back to you with the sample Access database. Hope it helps.

Thanks,
Michael
 
Back
Top