apcsolutionsuk
asked on
Microsoft Access Search Box
HI
Ive got a call loging database, I need a search box so it will show you when you type the company name in it will show all the calls that were logged from them.
also one for the date. so you can have all calls from this date to this date?
Ive got a call loging database, I need a search box so it will show you when you type the company name in it will show all the calls that were logged from them.
also one for the date. so you can have all calls from this date to this date?
ASKER
Thank you. got that working
just need the time now. ive tryed myself but i cant seam to get it working. please could you help me do the date task
just need the time now. ive tryed myself but i cant seam to get it working. please could you help me do the date task
You can use the same frmSearch form to add two text boxes. One called "txtStartDate" for the first date and the other called "txtEndDate".
Create another command button (cmdSearchDates) and use the following code in the on_click:
Private Sub cmdSearch_click()
DoCmd.OpenForm "frmSearchDates"
End Sub
Now use the same second part of the above solution and create a form that will display the data you want and a query that will pull it to use as the recordsource of the form. In the query, set the criteria for your date field to:
Between Forms!frmSearch!txtStartDa te And Forms!frmSearch!txtEndDate
Same principles, different criteria.
Hope that helps,
Sean
Create another command button (cmdSearchDates) and use the following code in the on_click:
Private Sub cmdSearch_click()
DoCmd.OpenForm "frmSearchDates"
End Sub
Now use the same second part of the above solution and create a form that will display the data you want and a query that will pull it to use as the recordsource of the form. In the query, set the criteria for your date field to:
Between Forms!frmSearch!txtStartDa
Same principles, different criteria.
Hope that helps,
Sean
ASKER
Thanks that has answered my question :)
but if you could help me on a little thing.
When i click on the date field in the forms i would like it to show the little popus calander when clicked on.
and is there a command for the company box so it will find all the customers so you only have to type in the first few letters? thanks
but if you could help me on a little thing.
When i click on the date field in the forms i would like it to show the little popus calander when clicked on.
and is there a command for the company box so it will find all the customers so you only have to type in the first few letters? thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi this is what i mean. it came up automaticly in the forms before
image.bmp
image.bmp
Ahh, I'm not sure about then, then. I've primarily used Access '97. I would suggest posting a separate question for that. Sorry. :(
-Sean
-Sean
ASKER
thanks
You're welcome.
Thanks for the grade!
Thanks for the grade!
Private Sub cmdSearch_click()
DoCmd.OpenForm "frmSearchCalls"
End Sub
Part two of this solution is to create a form that will display that data as you wish it to be shown and use a query that links to the company field on the form as its recordset. In the query, place the following in the criteria for the Company Name field:
Forms!frmSearch!txtCompany
This will connect frmSearchCalls to frmSearch by way of the recordset query and will display all information for the company chosen or typed into txtCompany.