Somewhere you must be asking for that OrderID. Walk me through your steps. Are you opening a FORM or a REPORT? Are you using the Wizard?
Austin RitnerOP
@Reply 6 years ago
Trying to open a report and yes using the wizard. Trying to make it so I can view ALL orders for a customer in a report instead of the one thats currently open.
I copy/pasted the button onto the CustomerF and thats when it asks for the OrderID.
I've gotten it so that it's filtered to JUST the one on the screen, but it's just viewing all invoices for that particular customer that I'm having an issue with.
I had to review lesson 1 to see what I did. It's been a while since I recorded that lesson. Honestly I don't use this method myself. I almost never use macros, but I teach them in Expert classes because it's easier than VBA. I may change that in the future. Macros can be confusing. Somehow that macro is still looking for your OrderID. I would recommend creating the button new from scratch. Don't copy the other one. Your where condition should be correct. There are actually better methods of doing this. You can use VBA with a WHERE condition. I cover that in Access Developer 5 where I show printing checks. You can also do it with a query, like I show in this Tip Video. I should make an updated TechHelp video on this one.
Austin RitnerOP
@Reply 6 years ago
ok, on Order2Q, i still have the OrderID field and the criteria in that field is Forms!OrderF!OrderID
Could that guy be the culprit? Do I need to just take that out?
Austin RitnerOP
@Reply 6 years ago
oh my goodness. I just took out that criteria on Order2Q and it worked. I see all orders for a particular customer.... ugh... guess i just needed some fresh eyes. been working on this DB for quite a while haha
That happens. LOL. It took me a few minutes because I have to put myself in the mindset of the student. I had to review what I covered in that lesson because my mind is always thinking of the most efficient way to do things in Access (which is usually the more advanced). You can do this with one line of VBA code:
In any event, I haven't covered this in a TechHelp video yet and that Tip video is quite old. Maybe I'll record an update. The list for TechHelp requests is pretty long tho.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Access Expert 13.