Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting User-Friendly parameters to access parameter

Status
Not open for further replies.
Oct 27, 2009
30
US
I am using a form to query a table in an Access database. The item being queried on the table would have a value of "Y" or "N" (meaning yes or no). On the user end, I would like to display the choices available to them in a drop down as "Yes" or "No" and then translate this to 'Y' or 'N' for the query. Can anyone help with this?
Thanks in advance.
Susan
 
A combo box can display one value and yet be bound to another. You could set your properties to:
[tt][blue]
Name: cboYN
Column Count: 2
Bound Column: 1
Row Source Type: Value List
Row Source: "Y";"Yes";"N";"No"
Column Widths: 0,0.5
Limit To List: Yes
[/blue][/tt]

Duane
Hook'D on Access
MS Access MVP
 
How are ya susieqtotallynew . . .

If I read you correctly base the rowsource of the combobox on a query that includes the following custom field ([blue]you1[/blue] substitute proper names in [purple]purple[/purple]):
Code:
[blue]AltFmt:IIf(Nz([[purple][b]Y/N FieldName[/b][/purple]],"No")="Y","Yes","No")[/blue]
You display the [blue]AltFmt[/blue] field in the combobox and when you make a selection you return your [blue][Y/N FieldName][/blue], which would look like:
Code:
[blue]   Me!ComboboxName.Column(x)[/blue]

[blue]Your Thoughts? . . .[/blue]

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top