G
Guest
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)
@@--Seems like the Number1 is not being fed the value here @@
If rstBALLS.EOF = True Then NO_More_Powerball_Nos
Debug.Print "We found Balls "
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)
@@--Seems like the Number1 is not being fed the value here @@
If rstBALLS.EOF = True Then NO_More_Powerball_Nos
Debug.Print "We found Balls "