Bom dia, Srs.,
Estou iniciando a programação em VB, e deparei-me com o seguinte erro:
run-time erro ´3061´
too few parameters. Expected 1.
favor ajudem-me.
Aqui o Código.
Private Sub Form_Load()
Set BD = OpenDatabase(App.Path & "vendas.mdb")
Set Repor = BD.OpenRecordset("Repoe", dbOpenTable)
Repor.Index = "Titu"
If Repor.BOF = False Then
Repor.MoveMin
FrmRepoe.lbltitu.Caption = Format(Repor("[_titu]"), "#-####-######")
End If
FrmRepoe.DadosRepoe.DatabaseName = App.Path & "vendas.mdb"
sql = "SELECT Repoe.[_cod], produtos.[_des],produtos.[_Uni1],repoe.[_qtde],repoe.[_Vlrun1],repoe.[_vTot] FROM (Repoe INNER JOIN produtos ON Repoe.[_cod] = produtos.[_cod]) WHERE repoe.[_Titu] = [12006000001]"
FrmRepoe.DadosRepoe.RecordSource = sql
FrmRepoe.DadosRepoe.Refresh
FrmRepoe.GridRepoe.Columns(0).Caption = "CÓDIGO"
FrmRepoe.GridRepoe.Columns(1).Caption = "DESCRIÇÃO"
FrmRepoe.GridRepoe.Columns(2).Caption = "UNIDADE"
FrmRepoe.GridRepoe.Columns(3).Caption = "QTDE"
FrmRepoe.GridRepoe.Columns(4).Caption = "UNITÁRIO"
FrmRepoe.GridRepoe.Columns(5).Caption = "TOTAL R$"
FrmRepoe.GridRepoe.Columns(0).Alignment = 2
FrmRepoe.GridRepoe.Columns(1).Alignment = 2
FrmRepoe.GridRepoe.Columns(2).Alignment = 2
FrmRepoe.GridRepoe.Columns(3).Alignment = 2
FrmRepoe.GridRepoe.Columns(4).Alignment = 2
FrmRepoe.GridRepoe.Columns(5).Alignment = 2
FrmRepoe.GridRepoe.Columns(0).Width = 1700
FrmRepoe.GridRepoe.Columns(1).Width = 5000
FrmRepoe.GridRepoe.Columns(2).Width = 1000
FrmRepoe.GridRepoe.Columns(3).Width = 1000
FrmRepoe.GridRepoe.Columns(4).Width = 1500
FrmRepoe.GridRepoe.Columns(5).Width = 1650
If FrmRepoe.DadosRepoe.Recordset.EOF Then
FrmRepoe.GridRepoe.Enabled = False
Else
FrmRepoe.GridRepoe.Enabled = True
End If
End Sub
LANDIM.