requery

  • Thread starter Dimitris Nikolakakis
  • Start date
D

Dimitris Nikolakakis

I have a form named 'FOrders' and fields ClientID, FactoryID

I have a Combo box named Discount that takes values from table
Clientdiscounts (fields are ClientID, FactoryID, Discount)

The data of ComboBox is
SELECT Discount FROM Clientdiscounts WHERE ClientID = Forms!FOrders.ClientID
AND FactoryID = Forms!FOrders.FactoryID

My problem is that I cannot requery ther data of Discount if I change the
value of ClientID or FactoryID on the form.

I have tried in AfterUpdate of ClientID and FactoryID :
DoCmd.Requery([Combo]) but I get debug error.

thanks in advance
Dimitris
 
W

Wolfgang Kais

Hello Dimitris.

Dimitris Nikolakakis said:
I have a form named 'FOrders' and fields ClientID, FactoryID
I have a Combo box named Discount that takes values from table
Clientdiscounts (fields are ClientID, FactoryID, Discount)

The data of ComboBox is
SELECT Discount FROM Clientdiscounts WHERE ClientID =
Forms!FOrders.ClientID AND FactoryID = Forms!FOrders.FactoryID

My problem is that I cannot requery ther data of Discount if I change the
value of ClientID or FactoryID on the form.

I have tried in AfterUpdate of ClientID and FactoryID :
DoCmd.Requery([Combo]) but I get debug error.

Try DoCmd.Requery "Combo"
or Combo.Requery
 
T

tina

I have tried in AfterUpdate of ClientID and FactoryID :
DoCmd.Requery([Combo]) but I get debug error.

you're using the right event (AfterUpdate). try the following code, as

Me!Discount.Requery

hth
 

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

Similar Threads


Top