Prev: Create Table
Next: Text box and "Enter"
From: Silvio on 9 Feb 2010 15:27 Hello, I have a macro that open and filter a form based on two conditions: CustomerID and ProgramID. However, it does not filter as intended. I most likely I am missing something when concatenating the two conditions, any idea? ="[Customer_ID]=" & [CustomerID] And "[Program_ID]=" & [ProgramID] P.S. CustomerID and ProgramID are both numeric. Thank you, Silvio
From: DrGUI on 9 Feb 2010 16:36 Place an ampersand and the double quote before the ' And'. See below: = "[Customer_ID]=" & [CustomerID] & " And [Program_ID]=" & [ProgramID] "Silvio" wrote: > Hello, I have a macro that open and filter a form based on two conditions: > CustomerID and ProgramID. However, it does not filter as intended. I most > likely I am missing something when concatenating the two conditions, any idea? > > ="[Customer_ID]=" & [CustomerID] And "[Program_ID]=" & [ProgramID] > > > P.S. CustomerID and ProgramID are both numeric. > > Thank you, > Silvio
From: Mike Painter on 9 Feb 2010 16:41 Silvio wrote: > Hello, I have a macro that open and filter a form based on two > conditions: CustomerID and ProgramID. However, it does not filter as > intended. I most likely I am missing something when concatenating the > two conditions, any idea? > > ="[Customer_ID]=" & [CustomerID] And "[Program_ID]=" & [ProgramID] > ="[Customer_ID]=" & [CustomerID] & " And [Program_ID]=" & [ProgramID]
From: Silvio on 10 Feb 2010 08:25 Thank you folks, this is working great! I hope one day to fully understand the quotation mark logic :-) "Mike Painter" wrote: > Silvio wrote: > > Hello, I have a macro that open and filter a form based on two > > conditions: CustomerID and ProgramID. However, it does not filter as > > intended. I most likely I am missing something when concatenating the > > two conditions, any idea? > > > > ="[Customer_ID]=" & [CustomerID] And "[Program_ID]=" & [ProgramID] > > > ="[Customer_ID]=" & [CustomerID] & " And [Program_ID]=" & [ProgramID] > > > . >
From: Mike Painter on 11 Feb 2010 00:39 Silvio wrote: > Thank you folks, this is working great! I hope one day to fully > understand the quotation mark logic :-) > > "Mike Painter" wrote: > >> Silvio wrote: >>> Hello, I have a macro that open and filter a form based on two >>> conditions: CustomerID and ProgramID. However, it does not filter as >>> intended. I most likely I am missing something when concatenating >>> the two conditions, any idea? >>> >>> ="[Customer_ID]=" & [CustomerID] And "[Program_ID]=" & [ProgramID] >>> >> ="[Customer_ID]=" & [CustomerID] & " And [Program_ID]=" & >> [ProgramID] >> If I have a line like that in a code block I will usually pop it up in a msgbox to see if it looks right.
|
Pages: 1 Prev: Create Table Next: Text box and "Enter" |