Query Form

G

Guest

Hi,

I'm trying to setup a form that will look for a specific record on my table.
Basically I have followed the guidance given in the following article:
http://www.access.qbuilt.com/html/find_a_record.html

But unfortunately I encountered some problems:
1- For the first selection, it is OK, but if ever I try another string in my
Combo box, the result would be an update of the current record, which is not
the purpose of my for (only a query, no update, add or deletion).
2- I went to tried to setup the Edit property in the form to false and I
have added the necessary code to enable editing only on the combo box but
unfortunately I the form was not working correctly (a lot of error messages…)

So basically I will need your help:
To make my form work in only query mode with the possibility in my combo Box
to enter a data like “toto*†or “*toto†If I want to make a query for a
field that I know only the first part or the last part.

Thanks in advance,

Asma
 
G

Guest

I would put this in the query criteria --
Like "*" & [Forms]![YourFormName]![YourComboBox] & "*"
 
G

Guest

Hi Karl,

First of all, thanks for your reply but unfortunately I tried your solution
without success, I was getting a message box asking for the argument "
[Forms]![myFormName]![myComboBox]" and finally the current record has been
updated with the field value I entred in my combo box which is not the
objective of my form. By this form, I wanted to do only a query not an
update...
Best regards,

Asma

KARL DEWEY said:
I would put this in the query criteria --
Like "*" & [Forms]![YourFormName]![YourComboBox] & "*"

Asma said:
Hi,

I'm trying to setup a form that will look for a specific record on my table.
Basically I have followed the guidance given in the following article:
http://www.access.qbuilt.com/html/find_a_record.html

But unfortunately I encountered some problems:
1- For the first selection, it is OK, but if ever I try another string in my
Combo box, the result would be an update of the current record, which is not
the purpose of my for (only a query, no update, add or deletion).
2- I went to tried to setup the Edit property in the form to false and I
have added the necessary code to enable editing only on the combo box but
unfortunately I the form was not working correctly (a lot of error messages…)

So basically I will need your help:
To make my form work in only query mode with the possibility in my combo Box
to enter a data like “toto*†or “*toto†If I want to make a query for a
field that I know only the first part or the last part.

Thanks in advance,

Asma
 

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