L
ldiaz
Hi all..
I need help on this, I don’t know what I’m doing incorrect.
I have a Form (startup) opened and I have selected my UserID, from a
combobox , but I want to open another form but I want that my UserID selected
in startup form appear selected in my second form (Orders),
“â€first form informationâ€â€
Name of first form: Password
Name of Combo: Combo1
Statements : SELECT [Users].[UserID], [LastName] & " , " & [FirstName] AS
Name, [Users].[Password], [Users].[OrderPerson], [Users].[ApproverPerson],
[Users].[ReceiverPerson], [Users].[AdminPerson], [Users].[Active] FROM Users
WHERE ((([Users].[Active])=Yes)) Or ((([Users].[Active])=Yes)) ORDER BY
[Users].[Password];
Name of table that it’s belong: Users
“â€Second form informationâ€
Name of second form: Orders
Name of Combo: UserID
Statements : SELECT [Users].[UserID], [LastName] & " , " & [FirstName] AS
Name FROM Users;
Name of table that it’s belong: Users
“â€â€I have written this code in the button that open the second form""
What I doing incorrect?? Please help me!!
-_____________________________________
Private Sub OpenOrders_Click()
On Error GoTo Err_OpenOrders_Click
DoCmd.Close ‘’ this will close first form
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Orders" ‘’ Name of second form
stLinkCriteria = [UserID] = " & Me![Combo1]"
If Not Me![Combo1] Then
DoCmd.OpenForm stDocName, , , stLinkCriteria
Else
MsgBox "You need select your User", vbCritical, "Error"
End If
Exit_OpenOrders_Click:
Exit Sub
Err_OpenOrders_Click:
MsgBox Err.Description
Resume Exit_OpenOrders_Click
End Sub
_____________________________________________
Thanks to see my question
(e-mail address removed)
ldiaz
I need help on this, I don’t know what I’m doing incorrect.
I have a Form (startup) opened and I have selected my UserID, from a
combobox , but I want to open another form but I want that my UserID selected
in startup form appear selected in my second form (Orders),
“â€first form informationâ€â€
Name of first form: Password
Name of Combo: Combo1
Statements : SELECT [Users].[UserID], [LastName] & " , " & [FirstName] AS
Name, [Users].[Password], [Users].[OrderPerson], [Users].[ApproverPerson],
[Users].[ReceiverPerson], [Users].[AdminPerson], [Users].[Active] FROM Users
WHERE ((([Users].[Active])=Yes)) Or ((([Users].[Active])=Yes)) ORDER BY
[Users].[Password];
Name of table that it’s belong: Users
“â€Second form informationâ€
Name of second form: Orders
Name of Combo: UserID
Statements : SELECT [Users].[UserID], [LastName] & " , " & [FirstName] AS
Name FROM Users;
Name of table that it’s belong: Users
“â€â€I have written this code in the button that open the second form""
What I doing incorrect?? Please help me!!
-_____________________________________
Private Sub OpenOrders_Click()
On Error GoTo Err_OpenOrders_Click
DoCmd.Close ‘’ this will close first form
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Orders" ‘’ Name of second form
stLinkCriteria = [UserID] = " & Me![Combo1]"
If Not Me![Combo1] Then
DoCmd.OpenForm stDocName, , , stLinkCriteria
Else
MsgBox "You need select your User", vbCritical, "Error"
End If
Exit_OpenOrders_Click:
Exit Sub
Err_OpenOrders_Click:
MsgBox Err.Description
Resume Exit_OpenOrders_Click
End Sub
_____________________________________________
Thanks to see my question
(e-mail address removed)
ldiaz