linkerschuh
10-07-2014, 06:24 AM
Dear all,
I have the following problem:
- I created a continuous form, which displays, based on a query, datasets out of a table in which a specific field ("username2") is missing
- Username2 is supposed to be the current windows user, which is determined in a module ("modul3")
- This module also puts the username in an unconnected cell on the continuous form
- What I want to achieve is that behind each dataset on the continous form, there is a command button through which the user can re-confirm that this specific dataset is correct; after each OK click, the field "username2" for this specific dataset is subsequently updated in the table
- As it is a continous form, there are numerous datasets on it; the only code I manage to come up with is that in case any given OK button is clicked, all datasets in the table are updated, not the single one, after which the OK button is placed; the rest of the problem (reading user name, query, etc) is sorted out, but I don't achieve that only the single dataset in question is updated
Here is the current code (the only one working I could come up with):
Private Sub Umschaltfläche13_Click()
CurrentDb.Execute "UPDATE Base " & _
"SET Username2 = '" & Modul3.UserNameWindows & "'"
End Sub
Anybody an idea how this can be solved?
Thanks so much!!!
I have the following problem:
- I created a continuous form, which displays, based on a query, datasets out of a table in which a specific field ("username2") is missing
- Username2 is supposed to be the current windows user, which is determined in a module ("modul3")
- This module also puts the username in an unconnected cell on the continuous form
- What I want to achieve is that behind each dataset on the continous form, there is a command button through which the user can re-confirm that this specific dataset is correct; after each OK click, the field "username2" for this specific dataset is subsequently updated in the table
- As it is a continous form, there are numerous datasets on it; the only code I manage to come up with is that in case any given OK button is clicked, all datasets in the table are updated, not the single one, after which the OK button is placed; the rest of the problem (reading user name, query, etc) is sorted out, but I don't achieve that only the single dataset in question is updated
Here is the current code (the only one working I could come up with):
Private Sub Umschaltfläche13_Click()
CurrentDb.Execute "UPDATE Base " & _
"SET Username2 = '" & Modul3.UserNameWindows & "'"
End Sub
Anybody an idea how this can be solved?
Thanks so much!!!