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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Subform not updating

Status
Not open for further replies.

mudstuffin

Technical User
Sep 7, 2001
92
GB
Hello.

Can someone help please?!

I have an Access form with 3 subforms on it.

On there I have a button to add a record to a table a listing of which is shown in one of the subforms.

However, when there are about 8 users logged on, it doesnt update the subform with the record after clicking the button to add one. The record has been added, but doesn't show until you come out of the form and go back in to the record. I have used refresh, requery & repaint at the end of the record adding sequence triggered by the button as well as in the afterupdate event of the subform.

I thought that I must have referenced the subform incorrectly or not used the correct syntax for the requery, but the thing is, it works fine when only one user is using it - just click the button and type in how much to add and hey presto, it adds it to the subform.

Is this a known problem with Access? Is it not updating because its running slowly (record of form is linked from table of about 240k records and subform is linked to that) and combined with not coping with 8 simultaneous users?

Incidentally, I can have a button on the form which just runs a requery and the form updates after clicking that (after adding the record which isnt showing), but the same code within the add record sequence doesn't update the form after the record is added.

Any suggestions?

Thanks,


Greg.

Philosophical and slightly witty comment to follow here....
 
I'd replace yourFormReference.Requery with yourFormReference.RecordSource = yourFormReference.RecordSource

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Hello PH.

Thanks for this.

I tried that, but I get the same result unless it is because I'm not doing it correctly.

I also tried putting that into the button that manually refreshes the form (to test if I was doing it correctly) and that refreshes the same as the requery method.

The subform is based on a query called query2.

With your suggestion, I used:

Forms!feeinfo!FeeDetailSubform3.Form.RecordSource = "query2"

Is that correct?

Regards,


Greg.

Philosophical and slightly witty comment to follow here....
 
Any more suggestions on this - I'm still stuck and totally baffled by it?

Philosophical and slightly witty comment to follow here....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top