A Big headache please help

naym

Registered User.
Local time
Today, 11:38
Joined
Aug 30, 2006
Messages
47
Hi all,

ok i have a bit of a problem here and this is it.

I have set up a quesry based on 2 forms 1 orders and 2 order details.
i have the set a criteria on the report to print a order number

i have then set up a report based on the query.
Then i have created a command button on my form up untill here it is fine the problem is when i create the order and send it to print the criterai box pops up which is ok but because i am using a touch screen it will not be viable for the user to enter the number each time he prints i would want it to pick it up from the current order id.

Is there a way to do this as i am sure all invoice systems and everything should be working like this or is there a better way to do this or am i doing something wrong i have attached a screen shot of what si going on

Thanks
 
Attached is the attachment sorry if its a bit too small woudnt allow me to add anything that is bigger
 

Attachments

  • rpt2.JPG
    rpt2.JPG
    78 KB · Views: 165
In the criteria box for the query, enter the details of the control on your form that holds the ID. The syntax is :

Forms!NameOfYourForm!NameOfYourControl
 
Hi
i allready have the syntax in the criteria for the query it is:
[ Forms]![Orders]![Order id]

But the porblem is when i click print i get the critera box oming up asking for the order number how can i get it to just print the current order and order details without actually typeing the order number?
 
It looks like the name of your control is the same as the field it is bound to. This is poor practice that unfortunately the form wizard uses and can trip you up. It's better to use a naming convention for controls such as txtOrderID, cboMyCombo etc.

Also watch out for stray spaces. In your quote you have one at the start of [ Forms] as well as one in your control name [Order id]. It's best not to have spaces in object names.
 
Hi,

Thanks for the reply,

Yes i did notice them and thanks for pointing them out, however the query does work but the only problem i am having is that when printing the parameter comes up asking to enter the order id to print but all i am wanting to do is print the report which has the the order and order details so if i am on order say number 22 when i select the details and customer name on the orders form and then select there order in the order details i would want it to print that order order out which is why i used a criteria in the query but why cant it when i print just pick up the criteria from the forms order id current record surely it cant be that difficult am sure someone should know this it is getting very frustrating now.
 
What exactly does the parameter prompt say?
 

Users who are viewing this thread

Back
Top Bottom