473,513 Members | 2,448 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

A2K: possibilities of adding snazzy search functions?

Perhaps this has been asked before but there might be some up to date
thinking about this.

I really need a better search function for my asset register. I allow
assets to be entered and tracked over a period of time. There can be quite
similar assets and simply choosing from the combo box is not enough. I need
something more sophisticated.

How hard is it to get a listing that grows as I type in a search term,
character by character? Is this something I could only get by buying a
third-party control or is it doable in Access?

As the list is populated the user would be able to click on any result (or
first scroll the listbox to see further results) which then goes immediately
to that record.

ta
Jun 18 '07 #1
5 1948
You just need a standard combobox with its *autofill* feature to do this.
First you must have your form set up to display the record you want to
retrieve, i.e. you must have controls set up with the appropriate Control
Sources to bind them to the fields you want displayed. Then simply:

Add a combo box to your form. The Combobox Wizard will pop up
Select "Find a record based on the value I selected in my combobox."
Hit Next.
From the same query as the form is based on, click on the field you're
searching by to move it to the right side.
Hit Next.
Size the column appropriately.
Hit Next.
Name the combobox.
Hit Finish.

Now you can drop the combobox down and scroll down to the item to search by,
or you can start to enter the item, and the combobox will "autofill" as you
type.
Hit <Enterand the record will be retrieved.

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via http://www.accessmonster.com

Jun 18 '07 #2

"Deano" <de***@mailinator.comschreef in bericht news:5d*************@mid.individual.net...
Perhaps this has been asked before but there might be some up to date
thinking about this.

I really need a better search function for my asset register. I allow
assets to be entered and tracked over a period of time. There can be quite
similar assets and simply choosing from the combo box is not enough. I need
something more sophisticated.

How hard is it to get a listing that grows as I type in a search term,
character by character? Is this something I could only get by buying a
third-party control or is it doable in Access?

As the list is populated the user would be able to click on any result (or
first scroll the listbox to see further results) which then goes immediately
to that record.

ta
I don't know what you mean by 'snazzy', but recently I made a 'custom' search form for a client.
This is a search-form for students where the client can use 6 items to search on.
e.g there are controls for name, address, city, class and such.
When the client types in a search-string in one or more of the search-controls the list of students is *not* growing, but the list gets shorter with each character that is typed. The search-string can be any string in a search-control, or any combination in all the search-controls, (does not need to start at the beginning)
The search-form filters immediately. The Students are found very fast and easy that way.
A click on a specific record closes the search-form, and opens the Students-form with the record of that student.

If this is what you need, then let me know. I will explain further.

Arno R
Jun 18 '07 #3

"Arno R" <ar****************@planet.nlwrote in message
news:46***********************@text.nova.planet.nl ...

"Deano" <de***@mailinator.comschreef in bericht
news:5d*************@mid.individual.net...
Perhaps this has been asked before but there might be some up to date
thinking about this.

I really need a better search function for my asset register. I allow
assets to be entered and tracked over a period of time. There can be
quite
similar assets and simply choosing from the combo box is not enough. I
need
something more sophisticated.

How hard is it to get a listing that grows as I type in a search term,
character by character? Is this something I could only get by buying a
third-party control or is it doable in Access?

As the list is populated the user would be able to click on any result (or
first scroll the listbox to see further results) which then goes
immediately
to that record.

ta
>>I don't know what you mean by 'snazzy', but recently I made a 'custom'
search form for a client.
>>This is a search-form for students where the client can use 6 items to
search on.
>>e.g there are controls for name, address, city, class and such.
When the client types in a search-string in one or more of the
search-controls the list of students is *not* growing, but the >>list >gets
shorter with each character that is typed. The search-string can be any
string in a search-control, or any >>combination in all the search-controls,
(does not need to start at the beginning)
>>The search-form filters immediately. The Students are found very fast and
easy that way.
>>A click on a specific record closes the search-form, and opens the
Students-form with the record of that student.
>>If this is what you need, then let me know. I will explain further.
>>Arno R
That sounds pretty much what I'm trying to accomplish. It doesn't matter if
the list is being reduced or expanded as long as I end up with a match or
set of matches. With my data it would probably just match one.

Let me know more!



Jun 18 '07 #4

"missinglinq via AccessMonster.com" <u28780@uwewrote in message
news:73e25e2ddeab6@uwe...
You just need a standard combobox with its *autofill* feature to do this.
First you must have your form set up to display the record you want to
retrieve, i.e. you must have controls set up with the appropriate Control
Sources to bind them to the fields you want displayed. Then simply:

Add a combo box to your form. The Combobox Wizard will pop up
Select "Find a record based on the value I selected in my combobox."
Hit Next.
From the same query as the form is based on, click on the field you're
searching by to move it to the right side.
Hit Next.
Size the column appropriately.
Hit Next.
Name the combobox.
Hit Finish.

Now you can drop the combobox down and scroll down to the item to search
by,
or you can start to enter the item, and the combobox will "autofill" as
you
type.
Hit <Enterand the record will be retrieved.
Ah! Yes, I know what you're saying there and I do have that but;

1 - it's not as clear to the user as I would like, putting in a new search
would enable possibilities to be filtered
2 - i would like something snazzier/cooler which if not overdone should help
with usability
Jun 18 '07 #5
"Deano" <de***@mailinator.comschreef in bericht news:5d*************@mid.individual.net...
Let me know more!
OK, I wil give an example with only two search-controls. You can adapt or expand that idea.
We are going to search Students here on Surname and City.

We need a Mainform (FrmSearch) with the two search-controls (strCity and strSurname, unbound)

We need a subform that will show the results.
Subform (Subform and control is called FrmSearchSub) might have an initial recordsource like:
Select * FROM TblStudents WHERE
Surname = Like "*" & Forms!FrmSearch!strSurname & "*" AND
City=Like "*" & Forms!FrmSearch!strCity & "*"
==The form will give you all the students when opened.
Make sure this works !!

You will then need to change the recordsource for the subform while typing in a search-string in a search-control like:

Private Sub strSurName_Enter()
Dim strSQL as string
strSQL="Select * FROM TblStudents WHERE"
strSQL=strSQL & " Surname = Like "*" & Forms!FrmSearch!strSurname.Text & "*" AND
strSQL=strSQL & " City=Like "*" & Forms!FrmSearch!strCity & "*"
Me.FrmSearchSub.Form.RecordSource = strSQL
End Sub

==The main point here is that we need to use the .Text property of the search-control in the recordsource.

Similar for strCity:
Private Sub strCity_Enter()
Dim strSQL as string
strSQL="Select * FROM TblStudents WHERE "
strSQL=strSQL & " Surname = Like "*" & Forms!FrmSearch!strSurname & "*" AND
strSQL=strSQL & " City=Like "*" & Forms!FrmSearch!strCity.Text & "*"
Me.FrmSearchSub.Form.RecordSource = strSQL
End Sub

You need a bit more code for the search-controls:
Private Sub strSurName_Change()
Me!FrmSearchSub.Requery
End Sub

Also for the second control:
Private Sub strCity_Change()
Me!FrmSearchSub.Requery
End Sub

==The requery will force the subform to show a limited set of records for each character that you type.

Suppose your Student is found, (or your Student is one of the xxx left...)
Now your sub can easily be coded to open the form FrmStudents with the record you want:
Let's suppose your PK is StudentNr.

Private Sub StudentNr_Click()
Dim lngStudent As Long
lngStudent = Me!StudentNr
DoCmd.Close acForm, Me.Parent.Name 'Closing the searchform will also close the subform
DoCmd.OpenForm "FrmStudents", , , "StudentNr = " & lngStudent
End Sub

I hope this makes sense to you.
Also hope that I did not make too much typo's here (translated the code somewhat) ;-)

Arno R

Jun 18 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
4158
by: wolftor | last post by:
1) Is there a free runtime version of Access available that is more recent than the one for Access 2000? 2) If I create an application (MDE) in A2K, will it run on all later versions of Access?...
10
1914
by: Arno R | last post by:
Hi all Yesterday I found a strange corruption-issue that I can't solve yet or actually point my finger at. I converted an A97 app to A2k. I have done this often enough so I didn't expect trouble...
2
1397
by: WillWeGetOurFreedomBack | last post by:
I have a user who is unable to start an A2K app. This app runs fine everywhere else. The error he get is: "Required DLL: wwint32v.dll not found" I can find no reference to this file at...
1
1479
by: SKG | last post by:
Hi all We currently use a split A2k database system with about 10,000 clients / 45,000 orders / 90,000 order entries etc with about 17 users (only 8 users do editing) We currently upload data...
2
3047
by: Wolfgang Kreuzer | last post by:
Hello all, I am converting an Axs 2.0 application to a2k (I know A2K is not the most current version but Axs 2.0 support ended and A2K is supported in our company amd on every PC). The form is...
10
1651
by: Arno R | last post by:
Hi all, I have a database that I need to use in different versions of Access. This is A97 in most places and A2k in a few other locations. (I develop in A97 and convert the db to A2k for these...
38
4502
by: Astra | last post by:
Hi All Could somebody please confirm that if I change my JS expression test from: if (!(/^*$/.test(document.form1.fred.value))) to if (!(/^*$/.test(document.form1.fred.value)))
3
1439
by: robert d via AccessMonster.com | last post by:
I develop my application on my desktop which has Access 2002 (default file format of A2K). My client uses A2K so I have installed A2K on my laptop. Recently when developing in A2002 my front end...
0
2586
by: Paul Brady | last post by:
I volunteer at a youth ministry agency and help them with their student database. They have two computers, both running Windows XP. Both have Office 2002 installed without Access, except that...
0
7388
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7545
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7111
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
5095
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
4751
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3240
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3228
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1605
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
461
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.