Subform Update

smotta

New member
Local time
Today, 03:38
Joined
Feb 23, 2007
Messages
3
Hi All,

I am trying to create a form with customer information on it. The form contains 2 subforms, one with general person info [custgen] and the other with sales to that customer [custsales] the main for is [custinfo]. I have it so that an employee enters the customers ID number on the primary field and it pulls up the corresponding information in the two subforms. This works flawlessly with the data that was in the tables the subforms pull from BEFORE i made the form. The problem arrises when i enter new information into the tables the subforms query from. when i enter a customer ID that corresponds to one of these individuals the subforms do not respond with any data at all. I thought this might be because the subforms were not able to get the data from the tables but this is not the case because if you pull the subform up on its own and manually scroll through all the various customers you will see the information for the new customers.

I know that sounds kind of confusing but does anyone have any idea what the problem is?

Thanks in advnace!
-Sean
 
You're not requerying/refreshing the subforms after you edit the main form and without that, the data will not appear in the subforms. You can open the subforms separately and see this data because opening the subforms separately will requery/refresh them.

Either create a button that is your "update" button or put code in the main form's AfterUpdate event (which will fire after you've altered the main form).

Forms("YourMainFormName").[YourSubformName].[Form].Requery
Forms("YourMainFormName").[YourSubformName].[Form].Refresh
 
Hey,

Ok, that seemed to run just fine but doesn't seem to have the desired effect. The names of customers entered after the original form was created still do not show up. Again, if i open the subform directly they will. Any other suggestions?

Thanks for the continued support
-Sean
 

Users who are viewing this thread

Back
Top Bottom