Syntax for F9

Steven811

Registered User.
Local time
Today, 16:33
Joined
Apr 18, 2004
Messages
133
Hi

I have 2 combo boxes in a form and the value selected in one needs to update the second combo box. This value becomes available via a query to the second combo box.

I decided I needed a requery (incorrectly I now believe), however this takes me back to the 1st record which is not ideal.

When I use F9 it does exactly what I want but I don't know what syntax to use in the AfterUpdate event procedure.

I've searched the archives, unsuccessfully.

Can anyone help?

Thanks

Steven811
 
Me.YourComboName.Requery

Hi Rich

Thanks for the reply.

I know that it should work all the right fields are in the drop down menu when I enter this code. When I change the data in the 1st combo box and expect the requery to update the data in the 2nd cbo, it doesn't.

However, when I use F9 it does.

Could it be because the cbo box is in MainForm.SubForm1.SubForm2

I tried:

Forms![forCustomerDetails2]![forSiteName]![forContactsJobTracking]!cboManager.Requery

That didn't work either.

Any suggestions would be well received.

Steven811

ps - as you can also tell I am a complete novice.
 
use the code/expression builder to get the correct syntax whilst the main form is open in design view
 
Sorry to be dim

Hi Rich

Sorry to be so dim.

This F9 issue is proving to be really difficult for me to resolve. I cannot find a refererence to F9 in the expression builder, neither can I search the archives as F9 is too short to search by.

I've several books and they don't offer any guidance either.

I'm unable to identify what F9 actually does so that I can pursue that as an option.

Could you point me in the right direction, please.

Steven811
 
.Refresh is the equivalent of F9, however the correct method is .Requery
use the Expression builder to get the forms syntax correct and just add .Requery to the end of the statement
 

Users who are viewing this thread

Back
Top Bottom