Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / June 2007

Tip: Looking for answers? Try searching our database.

The usual 3464 data mismatch question.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Celia - 04 Jun 2007 21:59 GMT
Hi guys:

I am hoping somebody may be able to help. I have a very simple code in a
combo box.  The code is below.  The proble is that I keep on getting a Data
Type Mismatch error when ever I try to run it.  Just FYI the PC_Tag_Number is
a text field composed of numbers.    

Private Sub Combo59_AfterUpdate()
 ' Find the record that matches the control.
   Dim rs As Object

   Set rs = Me.Recordset.Clone
   rs.FindFirst "[PC_Tag_Number] = " & Str(Nz(Me![Combo59], 0))
   
   If rs.NoMatch Then
   MsgBox "Not Found"
   Else
   Me.Bookmark = rs.Bookmark
   End If
End Sub

Any help is greatly appreciated.

Celia
Douglas J. Steele - 04 Jun 2007 22:05 GMT
rs.FindFirst "[PC_Tag_Number] = '" & Str(Nz(Me![Combo59], 0)) & "'"

You'd also be better off using

Dim rs As DAO.Recordset

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)

> Hi guys:
>
[quoted text clipped - 22 lines]
>
> Celia
Celia - 04 Jun 2007 22:31 GMT
Doub:

Thank you so much for your help.  It solved my problem.  

Celia

> rs.FindFirst "[PC_Tag_Number] = '" & Str(Nz(Me![Combo59], 0)) & "'"
>
[quoted text clipped - 28 lines]
> >
> > Celia
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.