Hi I am having some trouble connecting or open my tables from an ACCESS table i set up on my c drive. I keep getting an error that i need to set my object with something or did i reference the wrong library. Please help and thanks in advance.
============================================================
Private Sub Form_Load()
lblDate.Caption = Date
Set rsLogRpt = adoLog.Recordset
End Sub
Private Sub cmdNext_Click()
Dim vbResult As VbMsgBoxResult
If ValidData Then
adoLog.Recordset.Open
If Not adoLog.Recordset.BOF Then
adoLog.Recordset.MoveFirst
End If
adoLog.Recordset.AddNew
strEDPO = txtEDPO.Text
adoLog.Recordset("old_mf"
= Trim(strEDPO)
adoLog.Recordset("time"
= Date
adoLog.Recordset.Save
' strLoadTime = txtLoadTime.Text
' strXMITLoadTime = txtXMITLoadTime.Text
' strIINGLoadTime = txtIingLoadTime.Text
' strComment = txtComment.Text
adoLog.Recordset.Close
Unload Me
' frmLogResult.Show
frmTemp.Show
End If
End Sub
Private Function ValidData() As Boolean
Dim strMsg As String
If txtEDPO.Text = "" Then
strMsg = "Please enter EDPO50 data."
txtEDPO.SetFocus
' ElseIf txtLoadTime.Text = "" Then
' strMsg = "Please enter the End Time."
' txtLoadTime.SetFocus
' ElseIf txtXMITLoadTime.Text = "" Then
' strMsg = "Please enter the OrderNet End time."
' txtXMITLoadTime.SetFocus
' ElseIf txtIingLoadTime.Text = "" Then
' strMsg = "Please enter the IINGER End time."
' txtIingLoadTime.SetFocus
Else
ValidData = True
End If
If ValidData = False Then
MsgBox strMsg, vbOKOnly
End If
End Function
============================================================
Private Sub Form_Load()
lblDate.Caption = Date
Set rsLogRpt = adoLog.Recordset
End Sub
Private Sub cmdNext_Click()
Dim vbResult As VbMsgBoxResult
If ValidData Then
adoLog.Recordset.Open
If Not adoLog.Recordset.BOF Then
adoLog.Recordset.MoveFirst
End If
adoLog.Recordset.AddNew
strEDPO = txtEDPO.Text
adoLog.Recordset("old_mf"
adoLog.Recordset("time"
adoLog.Recordset.Save
' strLoadTime = txtLoadTime.Text
' strXMITLoadTime = txtXMITLoadTime.Text
' strIINGLoadTime = txtIingLoadTime.Text
' strComment = txtComment.Text
adoLog.Recordset.Close
Unload Me
' frmLogResult.Show
frmTemp.Show
End If
End Sub
Private Function ValidData() As Boolean
Dim strMsg As String
If txtEDPO.Text = "" Then
strMsg = "Please enter EDPO50 data."
txtEDPO.SetFocus
' ElseIf txtLoadTime.Text = "" Then
' strMsg = "Please enter the End Time."
' txtLoadTime.SetFocus
' ElseIf txtXMITLoadTime.Text = "" Then
' strMsg = "Please enter the OrderNet End time."
' txtXMITLoadTime.SetFocus
' ElseIf txtIingLoadTime.Text = "" Then
' strMsg = "Please enter the IINGER End time."
' txtIingLoadTime.SetFocus
Else
ValidData = True
End If
If ValidData = False Then
MsgBox strMsg, vbOKOnly
End If
End Function