G
Guest
Access 2000
I have a form I call "Pop-up Update Allocations" (form 1). This form has an
unbound combo box (cboCostCenter1) that is used to filter the selected
records that open in the next form called "Expenditure Allocation Update"
(form 2). This type of filter works in another application but the factors
must be somewhat different in this application because I get a window
prompted by the form 2's query that says Enter Parameter "Pop-up Update
Allocations1.cboCostCenter1" prompting the input that was input in form 1. If
I do not input any value in the window and click ok, the filter ultimately
works. Maybe a timing issue?
The following is the code I used to copy the entry on form 1 in field
cboCostCenter1 to form 2 field CC:
Private Sub Form_Open(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Pop-up Update Allocations"
stLinkCriteria = "[Pop-up Update Allocations].[cboCostCenter1]=" & "'" &
Me![CC] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End Sub
The above code is in the On Open Event
As I said the Criteria links and the form's query reports the correct
records but I get the query's window asking for the input it alread has. How
can I rewrite the code or change the location of the event to correct this
situation?
I have a form I call "Pop-up Update Allocations" (form 1). This form has an
unbound combo box (cboCostCenter1) that is used to filter the selected
records that open in the next form called "Expenditure Allocation Update"
(form 2). This type of filter works in another application but the factors
must be somewhat different in this application because I get a window
prompted by the form 2's query that says Enter Parameter "Pop-up Update
Allocations1.cboCostCenter1" prompting the input that was input in form 1. If
I do not input any value in the window and click ok, the filter ultimately
works. Maybe a timing issue?
The following is the code I used to copy the entry on form 1 in field
cboCostCenter1 to form 2 field CC:
Private Sub Form_Open(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Pop-up Update Allocations"
stLinkCriteria = "[Pop-up Update Allocations].[cboCostCenter1]=" & "'" &
Me![CC] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End Sub
The above code is in the On Open Event
As I said the Criteria links and the form's query reports the correct
records but I get the query's window asking for the input it alread has. How
can I rewrite the code or change the location of the event to correct this
situation?