Still trying to use check boxes in a continuous form

D

Design by Sue

I've posted this somewhere before but didn't get a reply so I will try to
reword it. I have a form (LocationFrm) with a subform (ReturnedSubFrm) that
is displayed as continuous form with a query as its record source. The query
concatenates the two primary keys into one field (Expr1) and also includes
PartNumber, Suffix(these are the concatenated fields), Line and Returned.
Line has a criteria set so that only the records that are in a particular
line are shown. The Returned is a yes/no check box. As each record desired
is selected by checking the box, I have a code that enters information in two
other fields on the original table (PartNumberTbl - on which the query above
is based) This all works exactly as I want it to EXCEPT!!! When the user
clicks on another record, the code is run and the info is added to the form
BUT a second dialog box comes up and states another user is using the form
(sorry but can't remember the exact wording) I diagnosed it and what is
happening is that when the user selects the 2nd record, Access is, through
the query adding the check box to the 1st records Returned check box. If I
click OK on this other user message box, not only does it add the check box,
it removes the info I added and corrupts the PartNumber and Suffix fields -
to the point that the only way to clean it up is to compact and repair the
database which removed the corrupted records.

Now my question is: is there any way to stop the action that Access is doing
to update the form when I go to the next record. I can build the change of
the Returned checkbox to yes in my on click code for the check box so that is
not an issue.

If I could just solve this problem I would have this project almost done!

Thanks as always for any help.

Sue
 
D

Design by Sue

I think I solve the problem I put the following before my SQL statement

If Me.Dirty = True Then
Me.Dirty = False
End If


That appears to have stopped the error and the check box is working properly.

I post this so if anyone is having a similar problem hopefully they won't
have to spend hours finding the solution.

Sue
 
A

Arvin Meyer [MVP]

In a bound form, Access will update the table the moment the focus is moved
off of the record, either to the main form, or to the next record. In an
unbound form, Access will make every record the same as you change the data
in a record.

The only way you can get what you want is with a third party grid control.
 
D

Design by Sue

Arvin thank you for taking time to reply - but what I have described works in
my case.

Sue
 

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