By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,377 Members | 1,660 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,377 IT Pros & Developers. It's quick & easy.

Updating Records on Form through Linked Tables

P: n/a
Hi I need some help here.

I am running Access 2003.

I have an Access DB linked (Front-end) to another Access DB (Back-end).

I have a Form which has a third party grid on it. The grid is
populated by creating an adodb recordset and assigning the recordset to
the grid.

When I want to update the grid. I double click a row and it pops up a
form to edit the data. The edit form is a standard form where the
forms data is bound by the linked table.

If a change is made then the form data is saved (manual thru
DoMenuItem, then I shut the form (the close should do an automatic save
also) and then I refresh the grid on the original form.

The problem is the save or update is not fast enough. By the time I
refresh the grid it still has the old data.

If I put a breakpoint in the code to slow things down. This gives it
enough time to do get the new data.

I could put something like a delay in the code but I think this is
unnecessary.

Am I missing something?? Is there a global setting that forces updates
to the linked tables instantly?? Or is there something else I should
do?

Thanks for any help.

Nov 13 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
You might put a DoEvents command in there so that the application is
forced to do the steps in strict sequence, instead of starting that and
then moving on to the next line of code immediately.

Nov 13 '05 #2

P: n/a
gl******@hotmail.com wrote:
The problem is the save or update is not fast enough. By the time I
refresh the grid it still has the old data.


I ran into exactly this problem with one of my sets of forms (not a 3rd
party grid) last Fall when I began working with A2003. To edit records
on a continuous form, I had a pop up unbound form which I would make
entries on and then the close button of the pop up would perform a Jet
SQL insert via ADODB (instead of DAO, which I've used for years).

The changes would not show afterward on the continuous for immediately.
Sometimes I had to close the continuous form and reopen it, other
times I'd wait about 25 seconds before the changes would appear on the
continuous form. I tried all manner of requeries, reassigning the
continuous form recordsource, nothing worked, at least not consistently.

I got some help from the folks on this forum who suggested that instead
of an unbound pop up form I use a bound pop up form - that works.
However, I was very concerned about this because although i was working
on a jet database at the time, my main area of work is Access FE on
Oracle databases.

Anyway, I paid the bucks to talk with an MS rep. They were able to
replicate the problem and the conclusion about what was causing the delay?

ADO DB.

DAO is native to Jet and I've been using it in my Jet apps at least
since then.

BTW, some might scoff, but I have to say the MS support techs are
excellent to work with. It's a bit pricey, but they've helped me
tremendously in the past when time was of the essence and I was dealing
with subject not really covered by this group.

--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Nov 13 '05 #3

P: n/a
Thanks for the info. Just to point out though the popup form was
bound. However bound to a linked table. Im not sure if the connection
to linked tables are ADO or DAO, either way I have taken the suggestion
above and looped for 1/4 second with a DoEvents statement.

This seems to work so far but not sure if it will be 100% consistent?

Nov 13 '05 #4

P: n/a
gl******@hotmail.com wrote:
Thanks for the info. Just to point out though the popup form was
bound. However bound to a linked table. Im not sure if the connection
to linked tables are ADO or DAO, either way I have taken the suggestion
above and looped for 1/4 second with a DoEvents statement.

This seems to work so far but not sure if it will be 100% consistent?


I didn't really have the problem with a bound pop up form. What I did
was have unbound controls in which information was entered and then on
clicking an OK command button, I'd have invisible bound controls = the
corresponding unbound.

I'm still using the above method in one of the first A2003 Jet apps I
developed and haven't had difficulty.

As for the doevents, I must confess I'm not 100% sure what doevents does
and I've never used it, though in consultation with the MS Access guys,
we tried it in the unbound situation I described in my first post and it
still didn't improve things. However, I'm not sure what a 1/4 second
loop is, we certainly didn't use it in that context, or at least I don't
remember.

Best of luck, if it works, wonderful. Keep an eye on it though... *&^%
ADO!!!! 8)
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Nov 13 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.