I have a report that prints out tasks and their respective ID number. I am attempting to make a form which will have a dialog box that will state to enter the desired task ID number. There will be a button on this form that displays "open form". I want this "open form" button to take the user directly to the form associated with the task ID number they entered for editing purposes on the task form itself. Is there any way without using a query to take this input (ID task number) and use it in the button command click code in order to just open the form of that specific task ID? Or is ther any better way to do this?
ie.
Me.taskID.value = Me.dialogbox.value
Private Sub OpenForm_Click()
On Error GoTo Err_OpenForm_Click
Dim stDocName As String
stDocName = "Form Name of Tasks"
DoCmd.OpenForm stDocName, acPreview (Is there any code I can put here to just open the form associated with the task ID number entered into the dialog box?)
Exit_OpenForm_Click:
Exit Sub
Err_OpenForm_Click:
MsgBox Err.Description
Resume Exit_OpenForm_Click
End Sub
Really appreciated all your help. Thanks.
ie.
Me.taskID.value = Me.dialogbox.value
Private Sub OpenForm_Click()
On Error GoTo Err_OpenForm_Click
Dim stDocName As String
stDocName = "Form Name of Tasks"
DoCmd.OpenForm stDocName, acPreview (Is there any code I can put here to just open the form associated with the task ID number entered into the dialog box?)
Exit_OpenForm_Click:
Exit Sub
Err_OpenForm_Click:
MsgBox Err.Description
Resume Exit_OpenForm_Click
End Sub
Really appreciated all your help. Thanks.