Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Requery problem

Status
Not open for further replies.

PaulMThomas

IS-IT--Management
Aug 2, 2004
133
GB
I have a form with Customer, site & contact. Each one refers to a seperate database, if you change the customer it automatically requeries the site and contacts to ensure all selections are paired up correctly (On exit run...)

I have now added a product category and product selection list, this works in a similar way with multiple products available in each category.
For some reason the requery code for the product does not work, even though as far as I can see it is identical to the customer, site, contact code.

When you select a different prduct category it should requery and actually clear the product selection.

Help!
 

Try posting the code that isn't performing as expected.


Randy
 
Hi

Private Sub Equipment_AfterUpdate()
Forms![frm_Hotline_Call]![Equipment].Requery
Forms![frm_Hotline_Call]![EquipmentType].Requery
End Sub

Yet, this works:-

Private Sub CustomerName_AfterUpdate()
Forms![frm_Hotline_Call]![CustomerSite].Requery
Forms![frm_Hotline_Call]![CustomerSiteContact].Requery
End Sub

I have checked the releationships etc but everything else seems to be the same!
 
You see the mess here ?
Private Sub [!]Equipment[/!]_AfterUpdate()
Forms![frm_Hotline_Call]![[!]Equipment[/!]].Requery
Forms![frm_Hotline_Call]![EquipmentType].Requery
End Sub

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Hi PHV

Excuse my ignorance but could you please explain your point to me in more detail?
 
this works in a similar way
I pointed out that the way is not similar.
 
Sorry, must be because it's a friday.

Why are they not similar?
 
Check carefully the name of each control in both procedures:
one procedure (the working one) involves 3 controls, the other only 2.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Yes, one if the for Customer, Site, Contact fields and the other is for the Equipment, Equipment Type fields.

My problem is that the Customer, Site, Contact one works 100%, if I select a different Customer it requeries the Site and Contact and clears the selections. This doesn;t happen for the Equipment/Equipment Type fields.
 

I think PHV is pointing out that you have your button named EQUIPMENT and you are then attempting to requery an object named EQUIPMENT. How do you requery a button?


Randy
 
Ok, sorry.

It's actually a AfterUpdate for a field. Perhaps I should take out the requery for that. Not sure this will solve it though as I am sure I put that in after it didn't work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top