473,385 Members | 1,379 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Search database but do not save

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
4 1890
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
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

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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: TH | last post by:
I am (still :) working on a recipe database. Now I am trying to figure out how to set it up for an ingredient search. What I want it to be able to do is to search by one ingredient, sometimes by...
0
by: Tim Zych | last post by:
I am using asp.net and ado.net to update an Access 2000 database. It works OK except, after minimal use, I get an error message: ----------------------- "The search key was not found in any...
1
by: SC | last post by:
I'm developing a site that may eventually have a very large database of users (hopefully, but who knows). It will be a community website where users can search each other (think Friendster,...
1
by: Eric | last post by:
Hi: I have two files. I search pattern ":" from emails text file and save email contents into a database. Another search pattern " field is blank. Please try again.", vbExclamation + vbOKOnly...
1
by: atl10spro | last post by:
Hello Everyone, I am new to MS Access and although I have created several different databases I lack the VB knowledge to code a search function. I am turning to your expertise for assistance. ...
3
by: Harry Haller | last post by:
What is the fastest way to search a client-side database? I have about 60-65 kb of data downloaded to the client which is present in 3 dynamically created list boxes. The boxes are filled from 3...
1
by: Harry Haller | last post by:
What is the fastest way to search a client-side database? I have about 60-65 kb of data downloaded to the client which is present in 3 dynamically created list boxes. The boxes are filled from 3...
6
by: shantanu | last post by:
Hi All, I have a requirement to develop a search engine based on some search criteria that will search for the string or statement in all the documents uploaded in the website. The search result...
8
by: Miro | last post by:
Hi sorry for the quick question. I am on the right track but just cant seem to find what to search for in my books / online for the answer I am looking for. I have created a dataset within my...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.