Updating Data

G

Guest

Problem:
I get a message window saying "The Data Has Been Changed - Another user made
changed before you saved yours..." What can I do to stop this window from
comming up?

Criteria:
User picks a specific value from a dropdown that triggers a form to pop up.
User enters data on the form and closes it then moves onto the next field on
the main form and this message pops up.

Code:
Private Sub TR_PROBLEMCODESUFFIX_AfterUpdate()

Dim stDocName As String
Dim stLinkCriteria As String
If Me.Dirty Then Me.Dirty = False


stDocName = "f_Drugs"
If Me.TR_PROBLEMCODESUFFIX = "MS3" Then

stLinkCriteria = "[ICNNO]=" & "'" & Me![ICNNO] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If
End Sub
 
O

OldPro

Problem:
I get a message window saying "The Data Has Been Changed - Another user made
changed before you saved yours..." What can I do to stop this window from
comming up?

Criteria:
User picks a specific value from a dropdown that triggers a form to pop up.
User enters data on the form and closes it then moves onto the next field on
the main form and this message pops up.

Code:
Private Sub TR_PROBLEMCODESUFFIX_AfterUpdate()

Dim stDocName As String
Dim stLinkCriteria As String
If Me.Dirty Then Me.Dirty = False

stDocName = "f_Drugs"
If Me.TR_PROBLEMCODESUFFIX = "MS3" Then

stLinkCriteria = "[ICNNO]=" & "'" & Me![ICNNO] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If
End Sub

Is the other form adding information to the same table?
 
G

Guest

YES

OldPro said:
Problem:
I get a message window saying "The Data Has Been Changed - Another user made
changed before you saved yours..." What can I do to stop this window from
comming up?

Criteria:
User picks a specific value from a dropdown that triggers a form to pop up.
User enters data on the form and closes it then moves onto the next field on
the main form and this message pops up.

Code:
Private Sub TR_PROBLEMCODESUFFIX_AfterUpdate()

Dim stDocName As String
Dim stLinkCriteria As String
If Me.Dirty Then Me.Dirty = False

stDocName = "f_Drugs"
If Me.TR_PROBLEMCODESUFFIX = "MS3" Then

stLinkCriteria = "[ICNNO]=" & "'" & Me![ICNNO] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If
End Sub

Is the other form adding information to the same table?
 
O

OldPro

YES



OldPro said:
Problem:
I get a message window saying "The Data Has Been Changed - Another user made
changed before you saved yours..." What can I do to stop this window from
comming up?
Criteria:
User picks a specific value from a dropdown that triggers a form to pop up.
User enters data on the form and closes it then moves onto the next field on
the main form and this message pops up.
Code:
Private Sub TR_PROBLEMCODESUFFIX_AfterUpdate()
Dim stDocName As String
Dim stLinkCriteria As String
If Me.Dirty Then Me.Dirty = False
stDocName = "f_Drugs"
If Me.TR_PROBLEMCODESUFFIX = "MS3" Then
stLinkCriteria = "[ICNNO]=" & "'" & Me![ICNNO] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If
End Sub
Is the other form adding information to the same table?- Hide quoted text -

- Show quoted text -

Access doesn't like editing the same table on two different forms at
the same time. This design is not compatible with Access. You could
get around it by using Visual Basic for Applications coding instead of
using the Access proprietary macros. Perhaps a better option would be
to rewrite your program so that all of the editing for this one table
is done on one form.
 
G

Guest

I have plenty of buttons that open forms which update the same table.

The issue in this case is that the form opens based on an IF statement when
one a specific value is picked.




OldPro said:
YES



OldPro said:
On Jul 6, 8:26 am, Dan @BCBS <[email protected]>
wrote:
Problem:
I get a message window saying "The Data Has Been Changed - Another user made
changed before you saved yours..." What can I do to stop this window from
comming up?
Criteria:
User picks a specific value from a dropdown that triggers a form to pop up.
User enters data on the form and closes it then moves onto the next field on
the main form and this message pops up.
Code:
Private Sub TR_PROBLEMCODESUFFIX_AfterUpdate()
Dim stDocName As String
Dim stLinkCriteria As String
If Me.Dirty Then Me.Dirty = False
stDocName = "f_Drugs"
If Me.TR_PROBLEMCODESUFFIX = "MS3" Then
stLinkCriteria = "[ICNNO]=" & "'" & Me![ICNNO] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If
End Sub
Is the other form adding information to the same table?- Hide quoted text -

- Show quoted text -

Access doesn't like editing the same table on two different forms at
the same time. This design is not compatible with Access. You could
get around it by using Visual Basic for Applications coding instead of
using the Access proprietary macros. Perhaps a better option would be
to rewrite your program so that all of the editing for this one table
is done on one form.
 
J

Jana

I have plenty of buttons that open forms which update the same table.

The issue in this case is that the form opens based on an IF statement when
one a specific value is picked.



OldPro said:
YES
:
On Jul 6, 8:26 am, Dan @BCBS <[email protected]>
wrote:
Problem:
I get a message window saying "The Data Has Been Changed - Another user made
changed before you saved yours..." What can I do to stop this window from
comming up?
Criteria:
User picks a specific value from a dropdown that triggers a form to pop up.
User enters data on the form and closes it then moves onto the next field on
the main form and this message pops up.
Code:
Private Sub TR_PROBLEMCODESUFFIX_AfterUpdate()
Dim stDocName As String
Dim stLinkCriteria As String
If Me.Dirty Then Me.Dirty = False
stDocName = "f_Drugs"
If Me.TR_PROBLEMCODESUFFIX = "MS3" Then
stLinkCriteria = "[ICNNO]=" & "'" & Me![ICNNO] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If
End Sub
Is the other form adding information to the same table?- Hide quoted text -
- Show quoted text -
Access doesn't like editing the same table on two different forms at
the same time. This design is not compatible with Access. You could
get around it by using Visual Basic for Applications coding instead of
using the Access proprietary macros. Perhaps a better option would be
to rewrite your program so that all of the editing for this one table
is done on one form.- Hide quoted text -

- Show quoted text -

Dan:

Does this mean that you're editing the record in form 1, discovering a
user entered certain data, and then opening that same partially edited
record in form 2, and making further changes to the data?

Jana
 

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

Write Conflict 6
button VS drop down 2
Can't Save 2
ADD Mode 4
Add record and update List 5
Type Mismatch 3
Open based on two values 4
If Statements 2

Top