Hi again,
I am having problem in opening a form and with following query,as I have inner joint in the query and try to open thin thing with a code on click with a button. the filtering is done with item_number on the current form on as I have two tables connected in querry and both have item_number in it and it gives me an error. code is shown below.
Dim strReportName As String
Dim strCriteria As String
strReportName = "rptitems"
strCriteria = "items_log.[items_number]='" & Me![items_number] & "'"
DoCmd.OpenReport strReportName, acViewPreview, , strCriteria
End Sub
Please help to modify this code to refer to aaprticular table.
SELECT items.item_number, item.[Items_Description]
FROM items INNER JOIN items_Log ON items.[item_number] = items_Log.[items_number];
Thanks,
I am having problem in opening a form and with following query,as I have inner joint in the query and try to open thin thing with a code on click with a button. the filtering is done with item_number on the current form on as I have two tables connected in querry and both have item_number in it and it gives me an error. code is shown below.
Dim strReportName As String
Dim strCriteria As String
strReportName = "rptitems"
strCriteria = "items_log.[items_number]='" & Me![items_number] & "'"
DoCmd.OpenReport strReportName, acViewPreview, , strCriteria
End Sub
Please help to modify this code to refer to aaprticular table.
SELECT items.item_number, item.[Items_Description]
FROM items INNER JOIN items_Log ON items.[item_number] = items_Log.[items_number];
Thanks,