[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 369
  • Last Modified:

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?
0
apcsolutionsuk
Asked:
apcsolutionsuk
  • 5
  • 4
1 Solution
 
SeanStricklandCommented:
One of the easiest methods I would suggest is to create a form (we'll assume the form's name is frmSearch) with a text box or combo box (we'll assume this is called txtCompany) that allows the user to type in or choose a company.  Place a button next to this text/combo box (we'll assume it's named cmdSearch), and place this code behind the on_click event of the command box:

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.
0
 
apcsolutionsukAuthor Commented:
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
0
 
SeanStricklandCommented:
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!txtStartDate And Forms!frmSearch!txtEndDate

Same principles, different criteria.

Hope that helps,
Sean
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
apcsolutionsukAuthor Commented:
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
0
 
SeanStricklandCommented:
"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"

This only works on combo boxes.  Make sure the property called "Auto Expand" on your combo box is set to "Yes".


"When i click on the date field in the forms i would like it to show the little popus calander when clicked on."
This site: http://www.accessmvp.com/JConrad/accessjunkie/calendars.html contains a wealth of knowledge on using/implementing calendars to work with your date fields.  


-Sean
0
 
apcsolutionsukAuthor Commented:
Hi this is what i mean. it came up automaticly in the forms before
image.bmp
0
 
SeanStricklandCommented:
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
0
 
apcsolutionsukAuthor Commented:
thanks
0
 
SeanStricklandCommented:
You're welcome.

Thanks for the grade!
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now