newly added data in tables-forms won't display (1 Viewer)

LisaAtWork

Registered User.
Local time
Yesterday, 16:38
Joined
Oct 1, 2012
Messages
10
This is with a database that I'm currently testing against LINKED tables in a SQL back end.

I wrote a VBA Import process which appears to work: records from import table are added to ticketorder and ticketorderdetail tables as expected with data in the correct locations, and the data shows up properly on reports and queries.

HOWEVER, the many forms do not display any of the newly added records. Even though the underlying queries for the forms work fine independently, the forms themselves pretend the records don't exist.

Any ideas?

Super grateful for any assistance. Code sample attached as text.

Lisa
 

Attachments

  • CodeExample.txt
    9 KB · Views: 138

SpentGeezer

Pure Noobism
Local time
Today, 09:38
Joined
Sep 16, 2010
Messages
258
Code:
Forms![Formname].requery

If the form is already open you may have to include this in your code (it may be already there...didn't have time to check it)
 

LisaAtWork

Registered User.
Local time
Yesterday, 16:38
Joined
Oct 1, 2012
Messages
10
I never thought to do that

I'll try that.

Lisa
 

Rx_

Nothing In Moderation
Local time
Yesterday, 17:38
Joined
Oct 22, 2009
Messages
2,803
Be sure to post your success/ failure or additinal comments.
It will help others help themselves in the future.
Really like your use of comments! Many times have inherited code to maintain where the "Comment Virus" must have deleted every single comment.
 

LisaAtWork

Registered User.
Local time
Yesterday, 16:38
Joined
Oct 1, 2012
Messages
10
Before I got a chance to change anything code-wise, the records showed up this morning like they'd never been away. I've no explanation...perhaps some delay in the requery instruction at the SQL server? I really have no idea. If I learn any more, I'll post.

Lisa
 

LisaAtWork

Registered User.
Local time
Yesterday, 16:38
Joined
Oct 1, 2012
Messages
10
may have an idea: I talked to the SQL administrator who controls the back end. When I asked her to add default values for 2 fields yesterday, she said one of them formerly accepted NULL values in for a field that was included in a union query...so maybe the Form display wasn't happy about the NULL values (even if the tables and reports could handle it). Just a guess.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Yesterday, 18:38
Joined
Feb 28, 2001
Messages
27,520
Can't tell you where to find this, but there is an auto-refresh/requery timer in Access. I think your problem is that Access doesn't do a requery automatically very often but will do one if you make it do one. And your symptom sounds awfully much like .requery is what you need.
 

Users who are viewing this thread

Top Bottom