Different record saving behavior in subforms

G

Guest

I have a main form that contains 4 subforms. The main form has no record
source, but the subforms do. The subforms are coordinated via a hidden field
on the main form and the link child/master properties of the each of the
subforms.

On my machine if I make a change to one of the records in a subform, and
move to the next subform, Access does an update of the record from the
changed subform. This is how I understand Access works.

However, on a another machine I'm using for testing, moving from one subform
to another, after making a record change, does not trigger an update. An
update is only triggered if I try to change the current record or close the
form.

So, now I wondering if there is some Access setting that explains the
different behavior on the two machines using the same database.

I'm using Access 2003 with the database on a Windows file server. The two
client machines are Windows XP.

Thanks for your help.
 
R

ruralguy via AccessMonster.com

See inline comments.
I have a main form that contains 4 subforms. The main form has no record
source, but the subforms do. The subforms are coordinated via a hidden field
on the main form and the link child/master properties of the each of the
subforms.

On my machine if I make a change to one of the records in a subform, and
move to the next subform, Access does an update of the record from the
changed subform. This is how I understand Access works.

The above is in fact expected behavior.
However, on a another machine I'm using for testing, moving from one subform
to another, after making a record change, does not trigger an update. An
update is only triggered if I try to change the current record or close the
form.

How are you changing other than the current record?
 
A

Arvin Meyer [MVP]

I'm going to take a guess that you are running the entire file from the
server. If this is the case, make sure your database is split into a
back-end with all the data tables, and a front-end linked to those tables
with everything else. Put the front-end on each workstation.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access
 
G

Guest

Your guess is incorrect (at least partially). My database is split.
However, both front and backend are on the server. However, I don't see how
that addresses my problem since I get the different saving behavior with two
different client machines against the same database on the server.

Regards,
Leif
 
G

Guest

Thanks for your reply.

I'm changing the record via a selection control (combo box) on the main
form. This combo box update the invisible field on the main form and then
requery the subforms.

Its interesting that on the second machine, when I'm updating the subforms,
I can see a pencil (update) on all three subforms at once. This is, in fact,
the behavior I want, I just didn't think Access would do that. On the first
machine it forces an update on the subform when a switch focus to a different
subform.

Regards,
Leif
 
R

ruralguy via AccessMonster.com

Lief,
Are you saying that on the first machine the ComboBox Requery is not working?
Thanks for your reply.

I'm changing the record via a selection control (combo box) on the main
form. This combo box update the invisible field on the main form and then
requery the subforms.

Its interesting that on the second machine, when I'm updating the subforms,
I can see a pencil (update) on all three subforms at once. This is, in fact,
the behavior I want, I just didn't think Access would do that. On the first
machine it forces an update on the subform when a switch focus to a different
subform.

Regards,
Leif
See inline comments.
[quoted text clipped - 23 lines]
 
A

Arvin Meyer [MVP]

On bound forms, when moving between main form and subforms, the record
should be saved. When moving between records the record should be saved.
That's the behavior that you should be seeing. Odd behavior, such as what
you are seeing, often occurs when people share the forms from a single
front-end.

Splitting a database has only some advantages unless the front-ends are on
each workstation. You are asking for problems by running the front-end on a
server. A few of the reasons are outlined here:

http://www.databasedev.co.uk/splitting-ms-access-database.html
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access
 
G

Guest

No, the combo box works in both cases. Let me explain in more detail.

I have an form before update event for alll of the subforms. When an update
is detected a prompt is given asking if the update should be saved. On the
first machine after making a change on a subform, and moving to the next
subform (change focus), the before update event is triggered and I get the
prompt message. A final prompt is given on a change in the combo box. So,
on the first machine a change in the focus of the subform, or a change on the
combo box, triggers the update event.

On the second machine, under the same scenario, I don't get a message when
changing focus between subforms, so I guess the before update event is not
triggered. I can change all four of the subforms without a message.
However, when I change the combo box that triggers the update event in all
the forms. So, I get the update message four times in a row.

Regards,
Leif

ruralguy via AccessMonster.com said:
Lief,
Are you saying that on the first machine the ComboBox Requery is not working?
Thanks for your reply.

I'm changing the record via a selection control (combo box) on the main
form. This combo box update the invisible field on the main form and then
requery the subforms.

Its interesting that on the second machine, when I'm updating the subforms,
I can see a pencil (update) on all three subforms at once. This is, in fact,
the behavior I want, I just didn't think Access would do that. On the first
machine it forces an update on the subform when a switch focus to a different
subform.

Regards,
Leif
See inline comments.
[quoted text clipped - 23 lines]
Thanks for your help.

--
HTH - RuralGuy (RG for short) acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
 
G

Guest

Hi Arvin,

Thanks for your reply. To check your idea I copied the front-end to my
local machine and tested the update of the form. As I suspected I saw the
same behavior, i.e., the database location had nothing to do with the problem.

However, in doing further testing I found what was causing the problem, and
this is really weird. On the first machine I'm running at a higher screen
resolution. So, on that machine the form is completely visible as I do the
updates. In this case Access works as expected, triggering a before update
event with a change of focus to another subform.

However, on the second machine with a screen at lower resolution the form is
only partially visible at any given time. To see the form I need use a
scroll bar to move the form up and down. In this case if I make a change in
one subform, then move to another subform, the before update event is not
triggered. It is only triggered when I close the form and use the combo box
to change the record.

So, I know the problem, but I'm at a loss on how to solve it.

Regards,
Leif
 

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

Top