Hi Everyone,
I was wondering if anyone can help me with a problem I am having.
I have a query which calculates for my suppliers their balance with debit and credit fields from a table called TRANSACTIONS. The query is called TRANSSUP
I have made a form with a ComboBox (named SELSUP) selecting the SUPPLIERS. I have also made a report based on the query called TRANSSUPREPORT which shows all the suppliers with debit, credit and balance fields.
I have also setup a button with the following event proceedure which would filter out the records only based on my combobox for suppliers. The Code is as below:
I have added code tags to properly to display your code. Please use code tags as it makes the code much easier to read. UG
However when I press the Button a Pop Up Box appears
where the name of the selected from the combo box supplier appears. When I enter the name of the supplier in the pop up box the report shows correctly the report with the selected supplier. I don't want the pop up box to appear, I just want the report to appear right after I click the button.
Anyone who can help will be much appreciated !! Thanks !!!
I was wondering if anyone can help me with a problem I am having.
I have a query which calculates for my suppliers their balance with debit and credit fields from a table called TRANSACTIONS. The query is called TRANSSUP
I have made a form with a ComboBox (named SELSUP) selecting the SUPPLIERS. I have also made a report based on the query called TRANSSUPREPORT which shows all the suppliers with debit, credit and balance fields.
I have also setup a button with the following event proceedure which would filter out the records only based on my combobox for suppliers. The Code is as below:
I have added code tags to properly to display your code. Please use code tags as it makes the code much easier to read. UG
Code:
Private Sub cmdOpenReport_Click()
On Error GoTo Err_Process
If (Not IsNull(Me.SELSUP)) Then
DoCmd.OpenReport "TRANSSUPREPORT", acViewPreview, , "[SUPPLIER]=" & Me.SELSUP
Else
MsgBox "You must select an account." & vbCrLf & vbCrLf & "Please try again.", vbExclamation, "No Account Selected"
End If
Exit_Process:
Exit Sub
Err_Process:
MsgBox "Procedure: cmdOpenReport" & vbCrLf & vbCrLf & Err.Number & " " & Err.Description, vbExclamation, "Error"
Resume Exit_Process
End Sub
However when I press the Button a Pop Up Box appears
where the name of the selected from the combo box supplier appears. When I enter the name of the supplier in the pop up box the report shows correctly the report with the selected supplier. I don't want the pop up box to appear, I just want the report to appear right after I click the button.
Anyone who can help will be much appreciated !! Thanks !!!
Last edited by a moderator: