Updating Data

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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?
 
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?
 
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.
 
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.
 
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
 
Back
Top