Solved

Find a record when the key field is a text field

Posted on 2014-01-16
4
305 Views
Last Modified: 2014-01-16
How can I correct this to work when the key field, TextMnumber, is a text field...

RS.FindFirst "[TextMnumber] = " & Str(Nz(Me![cboFindRecord], 0))
0
Comment
Question by:SteveL13
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 39785262
RS.FindFirst "[TextMnumber] = '" & (Nz(Me![cboFindRecord], 0))  & "'"
0
 
LVL 29

Expert Comment

by:IrogSinta
ID: 39785264
Try this:
RS.FindFirst "[TextMnumber] = '" & Nz(Me![cboFindRecord], "0") & "'"

Open in new window

0
 
LVL 57
ID: 39785292
Steve,

 You seem to be struggling a bit with passing strings in code.  With that, you might want to read through this:

http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_12-Dlookup-and-the-Domain-Functions.html

A large part of that article covers the passing of strings within a string (which you often do in code).

 Might help clear some things up for you.

Jim.
0
 

Author Comment

by:SteveL13
ID: 39785300
Jim,

Yes, you are right.  The whole issue confuses me.  Thanks for the link.  I appreciate it.
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

726 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