Re: How can I search a form without using FilterbyForm?
- From: John Vinson <jvinson@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 30 Mar 2005 23:00:06 -0700
On Wed, 30 Mar 2005 17:47:02 -0800, "Merlinar"
<Merlinar@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
>I am trying to port a database from LotusApproach to Access.
As I'm sure you're aware by now, these are VERY different programs
with very different structures and programming styles. Attempting to
use Access as if it were a flawed implementation of Approach will get
you into no end of trouble. Access can do everything that Approach
can... *but it does it differently*.
>One of the
>features of Lotus is that one can click find, is given a blank form (much
>like filter by form) and can fill in any field with any criteria seperated by
>commas (for multiple instances). Access seems to have a lot of problems
>doing this. I am trying to find a way to do this programmatically and haven't
>had much luck. Does anybody know what I'm talking about and have any ideas
>about setting something like that up? Any help would be greatly appriciated.
Is it OBLIGATORY that this be the exact user interface?
If so, then you can do it; you'ld use an unbound Form, and write VBA
code to massage the entered values into the SQL of a query, which you
would then use as the recordsource for a form or report. But this is
not a builtin Access methodology; you'll need to program it yourself!
Just to get started, you might have code like:
Dim strSQL As String
strSQL = "SELECT thisfield, thatfield, theotherfield FROM tablename" _
& " WHERE True"
If Not IsNull(Me!txtLastnameCrit) Then
strSQL = strSQL & " AND LastName IN(" & Me!txtLastnameCrit & ")"
End If
If Not IsNull(Me!txtFirstnameCrit Then
strSQL = strSQL & " AND FirstName IN(" & Me!txtFirstnameCrit & ")"
End If
<and so on>
John W. Vinson[MVP]
.
- Follow-Ups:
- Re: How can I search a form without using FilterbyForm?
- From: Merlinar
- Re: How can I search a form without using FilterbyForm?
- References:
- How can I search a form without using FilterbyForm?
- From: Merlinar
- How can I search a form without using FilterbyForm?
- Prev by Date: DateAdd +weeks dropping a few days
- Next by Date: display
- Previous by thread: How can I search a form without using FilterbyForm?
- Next by thread: Re: How can I search a form without using FilterbyForm?
- Index(es):
Relevant Pages
|