When I enter in an item to search the PCID field with I am running into problems. If I enter in the first item in the record I get "good find" but if I enter in anything else I get "bad find". I get this even when I enter in good search item. Below is my code.
'declare database variables
Public db As Database
Public rs As Recordset
Private Sub Cancel_Click()
'quits login and closes program
Private Sub Form_Load()
Set db = DBEngine.Workspaces(0).OpenDatabase(App.Path & "\tenneco.mdb")
Set rs = db.OpenRecordset("select PCID from parts", dbOpenDynaset)
'centers login in center of screen
Me.Top = (Screen.Height - Me.Height) / 2
Me.Left = (Screen.Width - Me.Width) / 2
'starts user in login box
Private Sub LogIn_Click()
If rs.RecordCount > 0 Then rs.MoveLast
If rs.Fields("PCID").Value = LogInForm.OperatorID.Text Then
MsgBox "good find"
MsgBox "bad find"
Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.
I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library. This article will introduce you to the SC library a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…