If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Passing two values to a form
I know how to pass one value to a form using a button:
stLinkCriteria = "[DepartmentAllocation]=" & "'" & Me![Combo142] & "'" But how can I change this code to pass two values? For example, I want to pass not just the DepartmentAllocation value but also the CustomerName value. Both are from combo boxes called Combo142 (for DepartmentAllocation) and Combo152 (for CustomerName) respectively. Can this be acheived? |
#2
|
|||
|
|||
Assuming that the Bound column of both combos refers to a Text type field:
stLinkCriteria = "([DepartmentAllocation]=""" & Me![Combo142] & _ """) AND ([CustomerName] = """ & Me.Combo152 & """)" -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Andrew Wilkins" wrote in message ... I know how to pass one value to a form using a button: stLinkCriteria = "[DepartmentAllocation]=" & "'" & Me![Combo142] & "'" But how can I change this code to pass two values? For example, I want to pass not just the DepartmentAllocation value but also the CustomerName value. Both are from combo boxes called Combo142 (for DepartmentAllocation) and Combo152 (for CustomerName) respectively. Can this be acheived? |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Strange stLinkCriteria behaviour on command button | Anthony Dowd | Using Forms | 3 | August 21st, 2004 03:01 AM |
Need help filtering values in form | Santa | Using Forms | 1 | July 22nd, 2004 11:45 AM |
Clearing Values in a form | Haji | Using Forms | 2 | July 9th, 2004 10:49 PM |
Getting values into a form | Praveen Manne | General Discussion | 2 | June 9th, 2004 07:12 PM |
average, eliminating zero values | Chris | Worksheet Functions | 6 | May 14th, 2004 11:36 PM |