Access 2003 from Requery problem

JonathanAnon

Registered User.
Local time
Today, 07:16
Joined
Sep 21, 2007
Messages
20
Hi,
This is my first post, thanks in advance for your help.

My problem is as follows:
I have a table for storing calls logged with the help desk. There is a one to many relationship with a subtable that defines the times spent on getting the call sorted. Each site visit associated with the call generates a new record in the subtable to say what date it happened and what time was spent on the call, on that particular occasion. So for one call logged we could have a number of visits to sort it out.

On my main form there is a list that runs a query to find all of the visits associated with the logged. This works fine for calls that already exist in the database. I go to the appropriate record on the main form, click add and then enter the details on the popup subform, then when I click close the query on the main form updates.

BUT, when I try to add a site visit to a new logged call, I add the details to the popup subform, click close, and the main form does not update unless I click F9. When the subform is closed I call a requery on the list box on the main form. Any ideas what is happening?

I've checked the table and it seems that the new logged call is not being added to the database unless I 1) hit F9 or 2) close the form and then open it again.
 
Got it sorted. Not sure if it's the best way, been working for hours on this and just tried this. ...

Problem was that the call logged was not being saved when I opened the subform to enter the site visit details. To counter this I saved the record on the add visit button before opening the subform

Not sure how good it is in programming terms, I am sure there is some reason why the purists say that it is bad, but it works. ;)
 

Users who are viewing this thread

Back
Top Bottom