Smoother ALternative to Refresh?

E

el zorro

I an adapting my .mdb Front End to an adp with a SQL back end. I have a user
form with a lot of list boxes. In the old mdb version, when an item was
selected from a list box, the associated data would appear instantly in
specified areas on the form. For example, if a client is selcted fom a list,
her name would appear in other tabs on the form to remind the user which
client she was working on when the list box is out of sight. In adp, however,
I notice that when a client is selected, the primary key is recorded as it
should be in the record, but the information on related fields outside the
list box are not refreshed. So I have a refresh command in the After Update
event of the list box.

The problem is that, yes, it works, but it momentarily closes the screen and
reopens it. It's just an instantaneous pause, true, but it seems awfully
clunky, particularly when compared to the swiftness of the mdb version of the
form. ANd my users can get real touchy over changes to their program. I can
already hearing them say "how come the screen flashes every time I use the
list box?"

ANy thoughts?
 
S

Sylvain Lafontaine

Not sure what you mean exactly by « related fields outside the list box ».
Probably that looking for why they are not refreshing automatically of, if
necessary, to refresh them individually would be a better idea than to
refresh the whole form. It's also possible that you should use the requery
command instead of the refresh command; I don't know.
 
E

el zorro

THe form is based on a query, WHen the user selects a client from the list
box, the primary key of that client is correctly placed in the primary key
field of the record the user is working on.

In the .mdb version, this action resulted in all of the associated client
fields included in the form's query,(such as Name, Address, Whatever) to
appear in those fields in the query and, accordingly, if I have those fields
displayed as text boxes on the form, the info appears there too.

IN the adp version, when the user selects a client from the list, the
correct primary key number for the client is added to the record, but the
associated information is not updated in the underlying query unless I do a
refresh.

I can see this problem without even looking at the form when I open the
form's query (or, in adp, "view") in just a datasheet view. If I type a
client number in the client number field, the .mdb query updates all of the
fields from the client table that are included in the SELECT query. IN the
adp version, when I type a client number in the view, the rest of the client
information is not updated untill I refresh the view.

It works to refresh the view, but this provides a visually unsettling lapse
in the user screen, and I was wondering if there was a softer way to acheive
the same result. Maybe ypur idea of just refreshing specific fields is the
way to go. Can you elaborate on that?

I appreciate your input!
 
P

Paul Shapiro

You might be able to eliminate the flashing by turning off the form painting
before the refresh, and re-enabling it after, with Me.Painting = False.
Moving the related info from the other table into a subform might be a
cleaner solution.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Recordset.Clone 2
Convert MDB to ADP 10
Transmitting Form changes to SQL Server? 2
Linked List Boxes on Form 7
Open pop-up form for certain client 2
Refresh in adp 2
Write Conflict 7
PRevent Form from Closing? 2

Top