By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,262 Members | 2,664 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,262 IT Pros & Developers. It's quick & easy.

Search database but do not save

P: n/a
Hi there,
I'm fairly new to access and the way it works and I have been building
a relatively simple database.
It is basically a database where staff members can search for what
training they (or others) have completed by staff name, staff group or
training name.
I created this using a form which had 2 text boxes and a combo box.
These were used to search a query and the results were displayed in a
sub form within the main form.
The problem I found with this is that anything that is entered into the
combo box was saved into the first entries field in the table I created
(which the query reads from).
Does anyone have any suggestions on how else I could go about creating
this database?
I read this post
(http://groups.google.co.uk/group/com...7d804a53846259)
to see a way around my current problem but it seems extremely long
winded!
I basically need the database to search without saving. Like a read
only type database.
If anyone can help I'd be really grateful.

Thanks a lot.

R.

Mar 23 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Use separate boxes for data entry and for searching.

If you are comfortable with VBA code, and you want to know how to write code
to search on any combination of several fields of different types, this link
might help:
http://allenbrowne.com/unlinked/Search2000.zip
It is a sample database for Access 2000 and later, demonstrating a search
form with several search boxes.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

<vi*********@googlemail.com> wrote in message
news:11**********************@u72g2000cwu.googlegr oups.com...
Hi there,
I'm fairly new to access and the way it works and I have been building
a relatively simple database.
It is basically a database where staff members can search for what
training they (or others) have completed by staff name, staff group or
training name.
I created this using a form which had 2 text boxes and a combo box.
These were used to search a query and the results were displayed in a
sub form within the main form.
The problem I found with this is that anything that is entered into the
combo box was saved into the first entries field in the table I created
(which the query reads from).
Does anyone have any suggestions on how else I could go about creating
this database?
I read this post
(http://groups.google.co.uk/group/com...7d804a53846259)
to see a way around my current problem but it seems extremely long
winded!
I basically need the database to search without saving. Like a read
only type database.
If anyone can help I'd be really grateful.

Mar 23 '06 #2

P: n/a
Thanks for this.
I think I'll need to take some time to read and understand the coding
used but it's exactly the sort of thing I'm looking for.
Thanks so much for your help.
I may be back with more questions soon!!

R.

Allen Browne wrote:
Use separate boxes for data entry and for searching.

If you are comfortable with VBA code, and you want to know how to write code
to search on any combination of several fields of different types, this link
might help:
http://allenbrowne.com/unlinked/Search2000.zip
It is a sample database for Access 2000 and later, demonstrating a search
form with several search boxes.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

<vi*********@googlemail.com> wrote in message
news:11**********************@u72g2000cwu.googlegr oups.com...
Hi there,
I'm fairly new to access and the way it works and I have been building
a relatively simple database.
It is basically a database where staff members can search for what
training they (or others) have completed by staff name, staff group or
training name.
I created this using a form which had 2 text boxes and a combo box.
These were used to search a query and the results were displayed in a
sub form within the main form.
The problem I found with this is that anything that is entered into the
combo box was saved into the first entries field in the table I created
(which the query reads from).
Does anyone have any suggestions on how else I could go about creating
this database?
I read this post
(http://groups.google.co.uk/group/com...7d804a53846259)
to see a way around my current problem but it seems extremely long
winded!
I basically need the database to search without saving. Like a read
only type database.
If anyone can help I'd be really grateful.


Mar 23 '06 #3

P: n/a

It's hard to tell exactly what your situation is without more details, but
if the point of the main form is just to enter search criteria to be used as
parameters for the query in the subform, then you'll probably want these two
textboxes and the combo box to be unbound (i.e. in the properties data tab,
they have no control source), and in the properties of the subform control,
you'll probably want nothing in the Link Master and Child boxes, so that the
subform isn't automatically linking to a field in the main form.
hope this helps
-John

<vi*********@googlemail.com> wrote in message
news:11**********************@u72g2000cwu.googlegr oups.com...
Hi there,
I'm fairly new to access and the way it works and I have been building
a relatively simple database.
It is basically a database where staff members can search for what
training they (or others) have completed by staff name, staff group or
training name.
I created this using a form which had 2 text boxes and a combo box.
These were used to search a query and the results were displayed in a
sub form within the main form.
The problem I found with this is that anything that is entered into the
combo box was saved into the first entries field in the table I created
(which the query reads from).
Does anyone have any suggestions on how else I could go about creating
this database?
I read this post
(http://groups.google.co.uk/group/com...7d804a53846259)
to see a way around my current problem but it seems extremely long
winded!
I basically need the database to search without saving. Like a read
only type database.
If anyone can help I'd be really grateful.

Thanks a lot.

R.

Mar 23 '06 #4

P: n/a
Hi there,
Thanks for your help guys.
It's sorted the problem with replacing the entry in the table but the
problem I have now is that when it requery's the sub form, the entry
that was in before stays in and the new entries go in as well.
So for example if I choose the department 'Finance' from the combo box
it displays all the finance staff but if I then type the surname
'Smith' in the 'surname' text box, Smith is displayed along with all
the finance staff. I have some code in VBA to make the text boxes/combo
boxes blank when you click in an alternate text box/combo box.
Is there an easy way around this?
Sorry if I'm making this difficult to understand!
Thanks again.

R.

John Welch (remove +'s) wrote:
It's hard to tell exactly what your situation is without more details, but
if the point of the main form is just to enter search criteria to be used as
parameters for the query in the subform, then you'll probably want these two
textboxes and the combo box to be unbound (i.e. in the properties data tab,
they have no control source), and in the properties of the subform control,
you'll probably want nothing in the Link Master and Child boxes, so that the
subform isn't automatically linking to a field in the main form.
hope this helps
-John

<vi*********@googlemail.com> wrote in message
news:11**********************@u72g2000cwu.googlegr oups.com...
Hi there,
I'm fairly new to access and the way it works and I have been building
a relatively simple database.
It is basically a database where staff members can search for what
training they (or others) have completed by staff name, staff group or
training name.
I created this using a form which had 2 text boxes and a combo box.
These were used to search a query and the results were displayed in a
sub form within the main form.
The problem I found with this is that anything that is entered into the
combo box was saved into the first entries field in the table I created
(which the query reads from).
Does anyone have any suggestions on how else I could go about creating
this database?
I read this post
(http://groups.google.co.uk/group/com...7d804a53846259)
to see a way around my current problem but it seems extremely long
winded!
I basically need the database to search without saving. Like a read
only type database.
If anyone can help I'd be really grateful.

Thanks a lot.

R.


Mar 24 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.