PDA

Click to See Complete Forum and Search --> : VBA/Access Help


Jan 10th, 2000, 12:24 AM
Can you combine the fields?

If you're using SQL to write your queries or recordsource, you could use a statement like this:
Select * from MyTable where [field1] & " " & [field2] & " " & [field3] like '*MyCriteria*'

If you're using the query grid, you can do the same thing by using the Build tool and selecting all your fields. In your grid, the field would read:
CombineFields: [field1] & " " & [field2] & " " & [field3]
and the criteria field would read:
Like "*mycritera*"

Hope it helps....

jct

[This message has been edited by jct (edited 01-10-2000).]

snowkitty
Jan 10th, 2000, 11:08 AM
Find no help in the Dbase section so I figured I would post here. I'm making a very diverse database for mutiple state usage and I'm having trouble figuring out what kind of VBA code I would need to be able to search across tables. I would like my endusers to be able to type in Jones and it would list not only all the people with the last name Jones but also all people who worked for Jones Co. or lived on Jones street etc.

Thanks
Erika

PS I'm not a programmer I'm a social scientist so I may have no clue what you're saying if you attempt to help =)

Smie
Jan 10th, 2000, 11:14 AM
Hello, I have a code to do exactly what your looking for, Im at school right now, I get home at about (3:30) est and I can post it then, if you get no help.....

Smie
Jan 10th, 2000, 11:17 AM
What type of a table are you using? (you may need to get some help for this if you dont understand) There are a few different kinds of tables, for the code I have, you need to use a

MSFlexGrid

(Microsoft FlexGrid)

controll......

snowkitty
Jan 10th, 2000, 11:22 AM
I'm using a plain Access 97 table I have no clue if that helps at all....and whoever offered to send me their code I would greatly appreciate it =)