button VS drop down

G

Guest

The user clicks a command button, a form opens, the user enters data.
Both forms are from the same table.

Same main form - the user picks a specific value from a drop down, a form
opens, the user enters data. But when the user goes to the next field on the
main form and enters data a window pops up - "The Data Has Been Changed
another user edited the data....."
What can I change to make this pop up not come up???


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 = "CO4" Or Me.TR_PROBLEMCODESUFFIX = "MS3" Then

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






A button on my form opens another form for the user to make comments.
Both forms are from the same table. I've done this many times, no problem
and the tables gets updated fine.

Now, I have a form pop up when a value is picked from a drop down. The user
enters the data and closes the form and moves on. When they try to enter the
next field data on the main form a message pops up " Another user
 
G

Guest

It sounds like you're using two bound forms - both bound to the same table.
When the user clicks the drop-down (asuming the control source is the bound
table), they've made a change to the record. That change needs to be written
back to the database before you can proceed.
 
G

Guest

I would agree with that statement - but my question is how I can/should allow
the update? I tried using - If Me.Dirty Then Me.Dirty = False - but the
message still comes up.




Dennis said:
It sounds like you're using two bound forms - both bound to the same table.
When the user clicks the drop-down (asuming the control source is the bound
table), they've made a change to the record. That change needs to be written
back to the database before you can proceed.

Dan @BCBS said:
The user clicks a command button, a form opens, the user enters data.
Both forms are from the same table.

Same main form - the user picks a specific value from a drop down, a form
opens, the user enters data. But when the user goes to the next field on the
main form and enters data a window pops up - "The Data Has Been Changed
another user edited the data....."
What can I change to make this pop up not come up???


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 = "CO4" Or Me.TR_PROBLEMCODESUFFIX = "MS3" Then

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






A button on my form opens another form for the user to make comments.
Both forms are from the same table. I've done this many times, no problem
and the tables gets updated fine.

Now, I have a form pop up when a value is picked from a drop down. The user
enters the data and closes the form and moves on. When they try to enter the
next field data on the main form a message pops up " Another user
 

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
Updating Data 5
Can't Save 2
add variable from outside table 19
Open based on two values 4
ADD Mode 4
Write to table then read data 1
stLinkCriteria 3

Top