RE: search query construction
- From: freelancer <freelancer@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 5 Jun 2008 04:16:01 -0700
Thanks for the advice,
Unfortunately this is not working: I’ve changed the "Your Form Name" to the
name of both the form I would like to open with results as well as the form I
am running the searching from and on both searches I am sent to the VB
editor. At both attempts the ‘Me.cmbField’ section of text is highlighted.
I have tried changing this to the field name I am searching but still with no
results.
Any other suggestions? Once again thanks for the help, it’s appreciated.
"Dennis" wrote:
Create your combo box with row source type set to field list and row source.
set to your table and then have a text box where you can enter the value. The
code behind the Go button should then build your criteria simiar to this
Dim strCriteria As String
strCriteria = Me.cmbField & " = '" & Me.txtValue & "'"
DoCmd.OpenForm "Your Form Name", , , strCriteria
"freelancer" wrote:
Although I’ve been using access for a number of years and have built a number
of databases I have not as yet been able to interrogate a query from a form.
I would like to be able to do this.
Essentially I want to create a form which has an empty ‘parameter query’
type box embedded, a drop-down-list of field which can be searched, and a
‘go’ button. The user will then be able to enter a search term, select the
field which he want’s to search and then ‘go’ to get the results (shown on a
‘continuous forms’ form).
Could somebody please advise a way I can do this?
Any responses will be greatly appreciated
- Prev by Date: Re: How to run VBA code on all rows of a table
- Next by Date: RE: I need help with locking selective cells in excel
- Previous by thread: Re: Unbound Textbox with Parameter Query
- Next by thread: Enter new record if search returns no results?
- Index(es):