T
TrueType
Dear Access Experts,
I am trying to create an Access form which contains an option group
(Frame1) with several entries. After selecting one of these entries the
user should be able to execute the corresponding query by clicking on
the action button (Command1). Unfortunately the action button
"Command1" does not accept the defined string in "Frame1" as the error
message "Method or data member not found" pops up. Can anybody help me
out? Here's my Access code:
____________________________________________________________
Private Sub Frame1_AfterUpdate()
Dim strSelection As String
Select Case Frame1.Value
Case 1
strSelection = "NameofQuery1"
Case 2
strSelection = "NameofQuery2"
End Select
End Sub
Private Sub Command1_Click()
On Error GoTo Err_Command1_Click
DoCmd.OpenQuery Frame1.strSelection, acNormal, acEdit
Exit_Command1_Click:
Exit Sub
Err_Command1_Click:
MsgBox Err.Description
Resume Exit_Command1_Click
End Sub
____________________________________________________________
Thanks for your help in advance,
TrueType
I am trying to create an Access form which contains an option group
(Frame1) with several entries. After selecting one of these entries the
user should be able to execute the corresponding query by clicking on
the action button (Command1). Unfortunately the action button
"Command1" does not accept the defined string in "Frame1" as the error
message "Method or data member not found" pops up. Can anybody help me
out? Here's my Access code:
____________________________________________________________
Private Sub Frame1_AfterUpdate()
Dim strSelection As String
Select Case Frame1.Value
Case 1
strSelection = "NameofQuery1"
Case 2
strSelection = "NameofQuery2"
End Select
End Sub
Private Sub Command1_Click()
On Error GoTo Err_Command1_Click
DoCmd.OpenQuery Frame1.strSelection, acNormal, acEdit
Exit_Command1_Click:
Exit Sub
Err_Command1_Click:
MsgBox Err.Description
Resume Exit_Command1_Click
End Sub
____________________________________________________________
Thanks for your help in advance,
TrueType