Recordset Criteria

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Sean Henry (SeanHenry_at_discussions.microsoft.com)
Date: 06/18/04


Date: Fri, 18 Jun 2004 09:19:01 -0700

I need to supply a SQL string for a recordset, and no matter what combination of quotes etc.... I use I cannot get this to work. The field SearchCompanyName is from the form. What am I missing?

Set rst = CurrentDb.OpenRecordset("select * from AddressBook" & _
   "where CompanyName=" & SearchCompanyName)

-- 
Sean Henry


Relevant Pages

  • Re: Converting Application from ADP to ACCDB
    ... too complexe or with linked Views or by directly creating a DAO recordset. ... side processing and avoid using querydefs since you can't change the SQL ... If you want to change the sql string of a querydef, ... affecting any other user in the application - and without having to use ...
    (microsoft.public.access.adp.sqlserver)
  • Re: domain aggegate function
    ... Thx, ... The domain functions cannot use a SQL string like that. ... Recordset though since that would only require a few more lines of code. ...
    (microsoft.public.access.formscoding)
  • Re: domain aggegate function
    ... Thx, ... The domain functions cannot use a SQL string like that. ... people would just use a Recordset though since that would only ...
    (microsoft.public.access.formscoding)
  • Re: Can inner join replace multiple loop selects?
    ... recordset being traversed. ... You can do the logic and incrementing in the loop through ... value compare that sql string to the previously executed one (so ... The only wrinkle is not incrementing between R and L ...
    (comp.databases.ms-access)
  • Re: SQL syntax: How to insert srting with double quotes?
    ... >> what quotes are delimiters, ... You need to fix ... >> each argument before you put it into the SQL string. ... I'm not saying one should always go with hungarian notation, in fact, I've ...
    (comp.databases.ms-access)