Link Criteria in command button

  • Thread starter Thread starter Heather
  • Start date Start date
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
 
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.
 
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
.
 
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
.
.
 
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.
 
Back
Top