It is very hard without looking at your mdb, would you like to post it to my
Address
[email protected]
If you want to then, compact the mdb and change the type from mdb to bmp and
send it, hotmail would remove the mdb.
:
I have now tried the same with several other forms that do work and they give
me the same result, the only difference being that when I run the
queries/reports from these forms they work.
Incressingly get confused and annoyed by this now.
Kevin
:
When you ran the immidiate did you enter a date in the field ActiveXCtlMin
If you did then the problem is not with the query, but with the field you
reference to.
Check again the names, you might have a field in the form that called
ActiveXCtlMin but it is not the field with the date in it.
If you didn't enter a date before it then try it again after entering the date
:
It come up with NULL.
:
What I mean, while the form is running, open the immidiate window, then type
?[Forms]![68frmMG01EPrintForm]![ActiveXCtlMin]
press enter and see if any value returned.
:
The name of the field that returns the data is called "rep_date"
"ActiveXCtlMin" is the name of the text box that the user puts the date in.
When I run the form nothing appears in the immediate window.
Cheers
Kevin PD
:
Is the ActiveXCtlMin is the name of the field that return a date?
Run the Immidiate windows (Press Ctrl+G) type
?[Forms]![68frmMG01EPrintForm]![ActiveXCtlMin]
While the form is running check if it returns any value, or you get an error
message
:
Hello,
Hear is the sql, it is just a simple extract from a view in the database.
SELECT informix_v654_vso01_v1_19.reporting_division,
informix_v654_vso01_v1_19.material_division,
informix_v654_vso01_v1_19.branch, informix_v654_vso01_v1_19.order_item,
informix_v654_vso01_v1_19.weight, informix_v654_vso01_v1_19.sales_value,
informix_v654_vso01_v1_19.net_profit, informix_v654_vso01_v1_19.rep_date
FROM informix_v654_vso01_v1_19
WHERE
(((informix_v654_vso01_v1_19.rep_date)=[Forms]![68frmMG01EPrintForm]![ActiveXCtlMin]))
ORDER BY informix_v654_vso01_v1_19.reporting_division,
informix_v654_vso01_v1_19.material_division, informix_v654_vso01_v1_19.branch;
:
I understand that the query has a filter with reference to the form.
Select * from MyTable Were DateField = Forms![FormName]![DateFieldName]
Can you post the SQL of qry_205_654f_MG01E_Daily_Sales_Orders, I undertand
that the report is based on it.
:
Hello,
Here is the open query and print preview code.
Cheers
Kevin PD
Private Sub cmd_Open_MG01E_Query_Button_Click()
On Error GoTo Err_cmd_Open_MG01E_Query_Button_Click
Dim stDocName As String
stDocName = "qry_205_654f_MG01E_Daily_Sales_Orders"
DoCmd.OpenQuery stDocName, acNormal, acEdit
Exit_cmd_Open_MG01E_Query_Button_Click:
Exit Sub
Err_cmd_Open_MG01E_Query_Button_Click:
MsgBox Err.description
Resume Exit_cmd_Open_MG01E_Query_Button_Click
End Sub
Private Sub cmd_Open_MG01E_Report_Button_Click()
On Error GoTo Err_cmd_Open_MG01E_Report_Button_Click
Dim stDocName As String
stDocName = "rpt_205_654f_MG01E_Daily_Sales_Orders"
DoCmd.OpenReport stDocName, acPreview
Exit_cmd_Open_MG01E_Report_Button_Click:
Exit Sub
Err_cmd_Open_MG01E_Report_Button_Click:
MsgBox Err.description
Resume Exit_cmd_Open_MG01E_Report_Button_Click
End Sub
:
Can you post the openreport command you wrote?
That will help us to find a problem, if there is one.
:
Hello,
I have a query and a report based on it, which as standalones work
perfectley. Once I add a command button [using the wizard] to a form they
both then return no data. The parameter being passed from the form is a date.
I have checked every form and button property, they are exactly the same as
the other 40 odd queries/reports in my app. I have deleted the form, query
and reports, rebuilt them etc. I have exported the entire db to a new one and
excluded thse quries/reports/forms but all to no avail.
Can anyone give me some pointers as to where else I should look ?
Thanks