DoCmd.OpenForm issue

Khushalay

Registered User.
Local time
Today, 05:07
Joined
Apr 16, 2016
Messages
180
Im trying to click on Customer name on the form and it takes me to "all" the forms related to that particular customer.
I have two types of records for each customer i.e. Shipped orders & Pending Orders.

No I want to have separate code or buttons for it. when I click on the Customer name under Pending heading, It should take me to the orders that are Pending only and same for the Shipped.

A check box determines whether a record has been shipped or not. if its ticked, record has been shipped, if Un ticked, means its still pending.

This code sworkd perfect in opening all the records":
DoCmd.OpenForm "Home", , , "Customer=" & aa.Value

what changes can I make only to open Shipped.

Thanks in advance
 
Home is the name of t he Form
Customer is the name of the field too pen the forms of that particular Customer
aa is the field on current form here I click n it takes me to the 2nd form
 
then what is the textboxname of your checkbox field (pending/shipped)?
 
Shipped is the name of the checkbox but i dont know where n hot to fit it. I tried using it but in vain
 
DoCmd.OpenForm "Home", , , "Customer=" & aa.Value & " And [Shipped] =" & [shipped]
 
Thanks, I tried but it gives me this error:
Run- time error 2465

Microsoft Access cant find the field '|1' referred to in your expression
 
then what is the recordsource of your form/report? does it include the shipped field?
 
Its not opening report. This wl open the Form...

One form having various customer names... clicking on a customer will open all the Records (Forms) associated with that Customer. The code I provide is serving this purpose. I ant only to show the shipped records(Forms)
 
on home form, do you have the shipped field? if not then add it. how can you filter on that field if it does not exists in the recordsource of form Home.
 
Yes, I have Shipped checkbox on Home Form. Plz help me out. This is stressing me. Day in and day out im trying to get it done.
 
Post your database with some sample data, zip it.
 
Just uploaded a zipped file of both front end and back end.

In the front end there is one form Boss... there r shipped and pending orders... I need them to open to the particular orders.

Please help me out, working on it since Thursday but cant figure out.
 
I tried to upload my file a couple of times but it says a security token is missing. Please someone help me on this.
 
did not have any attachment on your post.
 
May I getting ur email id here I can send it please. Im very desperate
 

Users who are viewing this thread

Back
Top Bottom