MS Access DB could not find X - Report Generation Help!

DanWall

Registered User.
Local time
Today, 13:54
Joined
Aug 11, 2008
Messages
78
Hi everyone.

My name is Dan, and I am a complete Access newbie.
I am proficient in Excel and VBA, so I thought learning access would be a breeze. I was SO wrong! I am using MSAccess 2007

I have a problem, that I thought someone may be able to help me with.
I have scoured the internet, Access help file and MSKB/MSDN and torn apart the Northwind DB, but nothing is assisting me with this specific problem.

I am trying to generate a purchase order report.

I have 2 tables.

Table 1 = Orders (primary key is 'poID').
Table 2 = Items (primary key is 'ID' with another field 'PO' linked to Orders.[poID]).

I have a command button on the form which allows the data entry.
('Orders' details in text boxes, and 'Items' in a subform table layout).

The command button opens a report I have set up.

I have tried numerous things in order to filter the report. (setting the recordsource straight to the linked tables, which is what I thought would be the most straight forward way. I have created a seperate query that lists all required info in the single row, including all primary keys.)

The filter I have in the command button (which opens with a macro), is
="[poID] = " & [poID]

Every time, I generate an error; MS Access DB could not find [poID]=1

This would indicate to me, that the [poID] field on the userform is ok. But the poID field in the report query is somehow missing or misnamed!?

Am I missing something guys? Any assistance you could give would be HUGELY appreciated, as I am on a bit of a deadline with this little project...

Cheers,

Dan.
 
OK, here's an update, but unfortunately still no success. I have tried just a simple report, using only the fields from the 'Orders' table in a simple tablature format. I still generate the same error.

I have attached the following screenshots.

error1.jpg = the error msgbox that keeps occuring.
error2.jpg = the layout of my tables
error3.jpg = the revised query layout in my new report format (to see the simplicity)
error4.jpg = the commandbutton macro
 

Attachments

  • error1.jpg
    error1.jpg
    52.3 KB · Views: 170
  • error2.jpg
    error2.jpg
    44.3 KB · Views: 170
  • error3.jpg
    error3.jpg
    24.9 KB · Views: 155
  • error4.jpg
    error4.jpg
    24.7 KB · Views: 170

Users who are viewing this thread

Back
Top Bottom