Infopath and Access Database

D

D

I am trying to create a form based on an Access Database of computer
equipment. How can I set he form so that when you do a query, you can put in
partial information in a field and the query will return every item that has
that information. Or for example if you leave out a dash or space the query
will still come back with data.

Thank you for your help,
D
 
S

S.Y.M. Wong-A-Ton

InfoPath's out-of-the-box querying mechanism looks for exact matches, so
you'll have to write code to do the querying if you want to search on partial
information. There are several samples posted in this newsgroup that show you
how to do the latter.
 
D

D

Thank you. I had a feeling that was going to be the answer. I am just
starting to use InfoPath and I'm not really sure how to play with the code.
I was hoping there was a tool in InfoPath itself.

Thank you again,
D
 
D

D

The user would type in the words or numbers to search in a particular field
in the query section of the form. Is that what you are asking?

-D
 
A

AP

i was wondering how to get the code into the infopage, and where i could get
some examples of this code

Thanks

AP
 
D

D

I'm sorry, I don't know, other than S.Y.M. Wong-A-Ton response in this
string, to look further in this newsgroup for sample code. At this point,
it is more than I really know how to do.

Good luck!
 
S

S.Y.M. Wong-A-Ton

Try this link:
http://groups.google.com/group/micr...nk=gst&q=where-clause&rnum=3#d97c311577ac170a

What you basicly need to do is add a field for entering your partial text.
Then in the OnClick event handler of a button, add code to retrieve the value
of this field, retrieve the Command string for the data connection of the
form, append a WHERE-clause to the Command string including the value of the
field plus an asterisk(*), and issue a Query() on the data connection.
Restore the Command string to its original value when done.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top