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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I construct a string from "true" check boxes:?

Status
Not open for further replies.

gusbrunston

Programmer
Feb 27, 2001
1,234
US
Had some help on this in the past, but can't find it now...
A table (Properties) has many check boxes to indicate what "amenities" belong with a particular property (record).

I'd like to construct a string, e.g., "AC BA FD FP FY WP", which means, "Air conditioned, balcony, Formal diningroom, Fireplace, Fenced yard, Water paid", from the checks boxes the user clicks in the entry form. Something like this (in basic Basic):
Code:
   If ckboxAC = True then AStr = "AC "
   If ckboxBA = True then AStr = AmenStr + "BA "
   If ckboxFD = True then AStr = AmenStr + "FD "
   If ckboxFP = True then AStr = AmenStr + "FP "
   If ckboxFY = True then AStr = AmenStr + "FY "
   If ckboxWP = True then AStr = AmenStr + "WP "
   If etcetera, etc....
I hope what I'm trying to do is clear. I can probably figure out how to do this in VB, but your help would be nice. Is this the best way to do this in Access2000? Should I use a query? Your suggestions would be most appreciated, muchas gracias, merci, etcetera, etc...

X-)
Gus Brunston
An old PICKer
padregus@home.com
 
Naturally, I screwed it up!
AStr should be "AmenStr"
:~/
Gus Brunston
An old PICKer
padregus@home.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top