Information générale
Titre:
Excel connot get the move method at perdcure
Dim Conn As ADODB.connection
Dim rstTemp As ADODB.Recordset
Dim sSQL As String
If txtListAtColumn.Value = "" Then
MsgBox "Your input the Quotation Number is (" & txtQuotationNumber.text & ") , the Item Number is (" & txtItemNumber.text & ") and the List At Column is (" & txtListAtColumn & "). Make sure the Quotation Number or Item Number must entied and the List At Column is a character ! Please entry it !", vbQuestion + vbOKOnly, Me.Caption
Exit Sub
Else
If (Not ((txtQuotationNumber.text = "") Or (txtItemNumber.text = "")) And (IsNumeric(txtListAtColumn.text) And (txtListAtColumn.text = ""))) Then
'If ((txtQuotationNumber.text = "") Or (txtItemNumber.text = "")) Or (IsNumeric(txtListAtColumn.text)) And (txtListAtColumn.text = "") Then
MsgBox "Your input the Quotation Number is (" & txtQuotationNumber.text & ") , the Item Number is (" & txtItemNumber.text & ") and the List At Column is (" & txtListAtColumn & "). Make sure the Quotation Number or Item Number must entied and the List At Column is a character ! Please entry it !", vbQuestion + vbOKOnly, Me.Caption
Exit Sub
Else
Set Conn = New ADODB.connection
Conn.Open "Driver={Microsoft Visual FoxPro Driver};SourceType=DBF;SourceDB=F:\FOXPROLN\CLIVE;Exclusive=no;"
Call gMouseW
Set rstTemp = New ADODB.Recordset
rstTemp.CursorLocation = adUseServer
If txtItemNumber.text = "" Then
sSQL = "SELECT expichdf.*, expictxf.* FROM expichdf INNER JOIN expictxf ON expichdf.oh_no = expictxf.od_no WHERE expichdf.oh_no='" & txtQuotationNumber.text & "'"
Else
sSQL = "SELECT expichdf.*, expictxf.* FROM expichdf INNER JOIN expictxf ON expichdf.oh_no = expictxf.od_no WHERE expictxf.od_cupn='" & txtItemNumber.text & "'"
End If
rstTemp.Open sSQL, Conn, adOpenStatic, adLockBatchOptimistic, adCmdText
If rstTemp.RecordCount > 0 Then
____________________________________________________
In this cmdlast click event cannot get the last record:
Private Sub cmdLast_Click()
rstTemp.MoveLast
txtCurrency.text = rstTemp![OH_SELLCY]
End Sub
____________________________________________________
please help me ^_^
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement