N
nouveauricheinvestments
Hi,
I am using the following event code in my after update code for a
combo box on my form. As you can see, I am setting [Pending
Tickets].ResearchedBy = a value on another form. I would like to
actually set this ResearchedBy field = a public variable. How should
I do this? I don't think I can incorporate a public variable into an
SQL statement. I used the value on another form because initially the
user signs into the application and this value on another form is set
to my public variable. My public variable is called 'ThisUser' and is
used throughout the application for restricting/granting permissions,
etc.
Any help would be greatly appreciated.
Private Sub Research_AfterUpdate()
Dim MySQL As String
Select Case Me!Research.Text
Case Is = "Yes"
MySQL = "UPDATE [Pending Tickets] SET [Pending
Tickets].ResearchedBy = [Forms]![frmSplash]![User] WHERE " & _
"[Pending Tickets].Explanation=[Forms]!
[ViewSelectedOpenTicket]![Explanation];"
DoCmd.RunSQL MySQL
Case Is = "No"
MsgBox "This ticket will remain in the Open Tickets view and
trade specialists will continue to see " & _
"it. If you plan to research and resolve this ticket, it
is important you mark this question " & _
"Yes.", vbCritical, "Alert"
End Select
End Sub
I am using the following event code in my after update code for a
combo box on my form. As you can see, I am setting [Pending
Tickets].ResearchedBy = a value on another form. I would like to
actually set this ResearchedBy field = a public variable. How should
I do this? I don't think I can incorporate a public variable into an
SQL statement. I used the value on another form because initially the
user signs into the application and this value on another form is set
to my public variable. My public variable is called 'ThisUser' and is
used throughout the application for restricting/granting permissions,
etc.
Any help would be greatly appreciated.
Private Sub Research_AfterUpdate()
Dim MySQL As String
Select Case Me!Research.Text
Case Is = "Yes"
MySQL = "UPDATE [Pending Tickets] SET [Pending
Tickets].ResearchedBy = [Forms]![frmSplash]![User] WHERE " & _
"[Pending Tickets].Explanation=[Forms]!
[ViewSelectedOpenTicket]![Explanation];"
DoCmd.RunSQL MySQL
Case Is = "No"
MsgBox "This ticket will remain in the Open Tickets view and
trade specialists will continue to see " & _
"it. If you plan to research and resolve this ticket, it
is important you mark this question " & _
"Yes.", vbCritical, "Alert"
End Select
End Sub