Simple search form request, please help!

josh.clare

Registered User.
Local time
Today, 11:26
Joined
Mar 4, 2010
Messages
22
Hello,
i have a simple table with a list of forename, surname, and a reference number.
I would like a simple form with a search for these three lists (forename, surname, reference number) that displays the result(s) below.
Please could some one make me on or tell me how to.
Would be greatly appreciated as i am new to access.
Thank you ever so much
Josh
 
i have a simple table with a list of forename, surname, and a reference number.
I would like a simple form with a search for these three lists (forename, surname, reference number) that displays the result(s) below.
Your database seems rather simple and I'm happy for you:)

Please could some one make me on ....
To 'know' you would need to 'do' as well. Start creating the form, do some searches on this forum using this link to find resources, there are lots regarding this sort of thing) and if you have specific questions just post back.

Welcome to AWF!
 
lol sorry, i meant one.
and thank you for being happy for me lol
i will give it ago.
Thanks
 
:DI'm glad you're taking the plunge. I'm certain you will find what you're looking for.

But don't hesitate to ask any specific questions.

Happy coding!
 
im having real trouble figureing this out, i find loads of tutorials but am still struggling. I am new to access, can someone please help or point me in the right direction.
thanks,
josh
 
So what have you found and what have you done? What are the errors? Those will help in diagnosing the problem you're facing.
 
well i have created some forms, inserted text box's and buttons, have added some codes i found from the internet adjusting them accordingly but nothing, i have tried several things but end up deleting them and starting again, i dont understand how my results are going to be displayed. thanks,
josh
 
Can you show some examples of code you've been working with?

What are the exact names of your three fields?
 
Hello,
have been using http://allenbrowne.com/ser-62.html
as a kind of guide, im pretty much copying some parts off it starting from scratch.
on the form, in the detail part, i am trying to get the list of my values from the table but can only seem to get the 1st row and cant seem to find how they have a list as all my settings seem to be the same?
Please help,
Thanks,
Josh
 
hey all,
have managed to create the perfect search form, thanks for all your help
josh
 
I can't get to your db, seems I need to setup an account. There's a way to upload on this forum. Click the GO ADVANCED button just next to the POST QUICK REPLY button below, then click MANAGE ATTACHMENTS. Browse, Upload (wait a few moments for the file to appear in the small window), close the window then Reply.
 
It looks good. Great job josh! Looks like Clare didn't have any input this time?:)

For your reset button I would use this instead because you only have three text boxes and I don't see any check boxes:
Code:
    txtFilterREFERENCE.Value = ""
    txtFilterSURNAME.Value = ""
    txtFilterFORENAME.Value = ""
    Me.FilterOn = False

Not sure why you were setting the text boxes to Null. Avoid that.
 
Hi there,

The way I tackle this is to first create a SQL statement as a string and add the textbox value to that SQL string. If you aren't great with SQL, you can get the SQL string by creating a query and changing to SQL view, then lastly tweak the SQL to include the TextBox value.
so:
'Setup the Record Set object & settings
Dim MyRS As New ADODB.Recordset
Dim Cnxn As New ADODB.Connection
Set Cnxn = CurrentProject.Connection
Set MyRS = New ADODB.Recordset

strTxtBox = TextBox1.Text 'May need to SetFocus first

'You will need to update the Table & Field Names with the below
strSQL = "SELECT tblResults.forname AS Forname, tblResults.surname AS Surname, tblResults.RefNum AS Reference_Number FROM tblResults HAVING (((tblResults.forname}=" & """" & strTxtBox & """" & "));"

'Then open the Record Set & BAM you have the results you want.
MyRS.Open strSQL, Cnxn, adOpenStatic, adLockOptimistic
 

Users who are viewing this thread

Back
Top Bottom