[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Access 2003.  Syntax for FindFirst

Posted on 2007-08-07
2
Medium Priority
?
359 Views
Last Modified: 2008-01-09
Access 2003.  Sntax for FindFirst.  [Username] and [Password] are fields in the table tblLogin.  
struserName and strPassword are captured from the Form using strUserName = Me......

The following syntax does not work.  Can someone please correct it.  Thanks.

Set db = CurrentDb
        Set RS = db.OpenRecordset("tblLogin")
        RS.FindFirst "[Username] =  '" & strUserName & "'" & "[Password] = '" & strPassword & "'"
0
Comment
Question by:jegajothy
1 Comment
 
LVL 61

Accepted Solution

by:
mbizup earned 200 total points
ID: 19646210
RS.FindFirst "[Username] =  '" & strUserName & "' AND " & "[Password] = '" & strPassword & "'"
                                                                                   ^--- Add this
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
Windows Explorer let you handle zip folders nearly as any other folder: Copy, move, change, and delete, etc. In VBA you can also handle normal files and folders, but zip folders takes a little more - and that you'll find here.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question