Whats my errpr here

C

Charlie

Option Compare Database
Option Explicit

Dim dbsBALLS As Database
Dim rstBALLS As Recordset
Dim intBALLS As Integer

Public Sub Command3_Click()
'On Error GoTo Err_Command3_Click

Dim stDocName As String
Dim stLinkCriteria As String
Dim Number1 As Integer
Dim Number2 As Integer
Dim Number3 As Integer
Dim Number4 As Integer
Dim Number5 As Integer

Number1 = 16
Number2 = 26
Number3 = 36
Number4 = 46
Number5 = 6
Debug.Print "No 1", Number1
Debug.Print "No 2", Number2
Debug.Print "No 3", Number3
Debug.Print "No 4", Number4
Debug.Print "No 5", Number5

Rem This code gets all power ball numbers FROM THE FILE
Set dbsBALLS = CurrentDb

'Here we get all the records then, cycle thru them to find the right bus

Set rstBALLS = dbsBALLS.OpenRecordset("select * " _
& " FROM [BALL COUNT]," _
& "WHERE [ball number] =" & Number1)
^

l

---This is not defined
If rstBALLS.EOF = True Then NO_More_Powerball_Nos

Debug.Print "We found Balls "
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top