Hi all, I came across this error message while trying to run the following code. Can you help with this problem?
Compile error: Method or data member not found
The following line is highlighted after the error message is displayed:
ePrisoft.ObjectName.value
Any help will be deeply appreciated
thanks much.
Compile error: Method or data member not found
PHP:
Sub getFieldCurrency(ObjectName As ComboBox, Rng As Range)
Dim conn As ADODB.Connection
Dim curInfo As ADODB.Recordset
Dim strConn, supName As String
strConn = "Provider = Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & ThisWorkbook.Path & "\eps.mdb"
Set conn = New ADODB.Connection
conn.Open strConn
Set curInfo = New ADODB.Recordset
curInfo.Open "SELECT * FROM cur_tab WHERE cur_cod = '" + LCase(Trim(ePrisoft.ObjectName.value)) + "'", _
conn, adOpenDynamic, adLockOptimistic, adCmdText
If (curInfo.BOF Or curInfo.EOF) Then
'if no records found
Else
'else show record
Rng.value = curInfo("cur_rat")
End If
curInfo.Close
Set curInfo = Nothing
conn.Close
Set conn = Nothing
End Sub
The following line is highlighted after the error message is displayed:
ePrisoft.ObjectName.value
Any help will be deeply appreciated
thanks much.