Link Criteria in command button

H

Heather

I am linking two forms through the click of a command
button. I need the criteria to be based on TWO fields--
Customer Number and Vendor Number. Access would only let
me choose ONE. Is there a way around this that I just
can't find know?

Heather
 
F

fredg

I am linking two forms through the click of a command
button. I need the criteria to be based on TWO fields--
Customer Number and Vendor Number. Access would only let
me choose ONE. Is there a way around this that I just
can't find know?

Heather

Heather,

There should be no problem using the 2 (or more) fields.

stLinkCriteria = "[CustomerNumber] = " & Me![CustomerNumber] & " AND
[VenderNumber] = " & Me![VendorNumber]

The above assume both fields are Number datatype and both are shown on
the form.

In Access Help files, look up:
Where clause + Restrict data to a subset of records.
 
G

Guest

Thanks!!!!! I feel really stupid... When I compared your
reply to my code, I FORGOT the "AND".

Thank you so much.
-----Original Message-----
I am linking two forms through the click of a command
button. I need the criteria to be based on TWO fields--
Customer Number and Vendor Number. Access would only let
me choose ONE. Is there a way around this that I just
can't find know?

Heather

Heather,

There should be no problem using the 2 (or more) fields.

stLinkCriteria = "[CustomerNumber] = " & Me! [CustomerNumber] & " AND
[VenderNumber] = " & Me![VendorNumber]

The above assume both fields are Number datatype and both are shown on
the form.

In Access Help files, look up:
Where clause + Restrict data to a subset of records.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal email
.
 
G

Guest

Nope. It wasn't my code. Even with the "AND" it still
doesn't work. Any other suggestions??
-----Original Message-----
Thanks!!!!! I feel really stupid... When I compared your
reply to my code, I FORGOT the "AND".

Thank you so much.
-----Original Message-----
I am linking two forms through the click of a command
button. I need the criteria to be based on TWO fields--
Customer Number and Vendor Number. Access would only let
me choose ONE. Is there a way around this that I just
can't find know?

Heather

Heather,

There should be no problem using the 2 (or more) fields.

stLinkCriteria = "[CustomerNumber] = " & Me! [CustomerNumber] & " AND
[VenderNumber] = " & Me![VendorNumber]

The above assume both fields are Number datatype and
both
are shown on
the form.

In Access Help files, look up:
Where clause + Restrict data to a subset of records.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal email
.
.
 
F

fredg

Nope. It wasn't my code. Even with the "AND" it still
doesn't work. Any other suggestions??
-----Original Message-----
Thanks!!!!! I feel really stupid... When I compared your
reply to my code, I FORGOT the "AND".

Thank you so much.
-----Original Message-----
On Fri, 6 Feb 2004 08:08:39 -0800, "Heather"

I am linking two forms through the click of a command
button. I need the criteria to be based on TWO fields--
Customer Number and Vendor Number. Access would only let
me choose ONE. Is there a way around this that I just
can't find know?

Heather

Heather,

There should be no problem using the 2 (or more) fields.

stLinkCriteria = "[CustomerNumber] = " & Me! [CustomerNumber] & " AND
[VenderNumber] = " & Me![VendorNumber]

The above assume both fields are Number datatype and
both
are shown on
the form.

In Access Help files, look up:
Where clause + Restrict data to a subset of records.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal email
.

Regarding: >Any other suggestions??<
Not unless you would care to post the entire OpenForm code and the
Load event code, as well a brief indication of what you are doing and
what you expect to happen.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top