linked popup

G

Guest

Hi,

I tried searching on "linked subform" and "linked popup form," but didn't
find any posts with this question.

I've created an Access 2000 form that's tied to a table. There are fields
in the table that only need to be filled in occasionally, so instead of
adding those fields to the form, I created a second popup form that's
accessed via a button. Everything seemed to be working fine -- until I
modified a value on the main form before clicking the button to open the
popup form. After making changes to the values on the popup form and closing
the form, when I tried to OK the changes on the main form, I got a "write
conflict" dialog box with the "save record" / "copy to clipboard" / "drop
changes" options.

Since the application is only running on one computer at this point, there
isn't any possibility that data is being changed simultaneously by another
user. I know that Access is assuming it's another user, because the change
is happening on a different form. Is there a way to indicate that the popup
form is tied to the main form?

Any help would be appreciated. I'll keep searching in the meantime.

Thanks,
Rich
 
G

Guest

If both the main form & the popup form are bound to the same table, then what
you are doing may be this:

1. Place record in edit status
2. Open popup form
3. Attempt to edit the record that is already in edit status.

You might try saving the record before you open the popup form using one of
these two statements:

If Me.Dirty Then DoCmd.RunCommand acCmdSaveRecord
If Me.Dirty Then Me.Dirty = False

Either one will save the changes so that you can edit from another form. Or,
you might consider just using a tab control on the form (instead of the popup
form) to keep all the controls on the single form where it will be edited
once instead of twice.
 
G

Guest

Thanks for your reply, Brian.

I'd thought about saving any changes to the record before opening the popup
form, but I'd really like to avoid it: I still want to give the user the
option of cancelling changes. I'll probably end up using this approach, but
I'd still like to find out if it's possible to avoid the write conflict
instead.

As for putting the controls on the main form, that's certainly an option,
but a very unattractive one: the form is already quite full, and there are
10 additional fields that will get populated very seldom, so I'd really like
to avoid cluttering up the main form with them.

Thanks,
Rich
 
G

Guest

Look again at my note about using a tab control. With a tab control, all the
controls on all the tabs are part of a single form, but only the controls on
the current tab are visible, so you can have a lot of controls, but only
navigate to the rarely-used ones as necessary by activating their tab(s), yet
remaining in edit mode throughout the transaction, with the ability for the
user to press Escape or click an Undo button to undo the entire edit.
 
G

Guest

Ah! I misunderstood, I thought you were just referring to the function of
using the tab key to navigate to a control.

I've never used a tab control before, I'll check it out. Thanks!

Rich
 

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