Jump to content
Fórum Script Brasil
  • 0

Busca


Guest - alex -

Question

Guest - alex -

Fala galera

Estou montando um programinha que cadastra direto no BD Access. Eu tive que mudar a conexão do BD que dados que era para access 97... ao mudar a busca não mais funcionou.

Vejam:

CONEXOÃO ANTIGA

***********************************

Private Sub Form_Load()

Data1.DatabaseName = App.Path & "\Cadastro.mdb"

End Sub

CONEXÃO NOVA

***********************************

Private Sub Form_Load()

sPath = _

"C:\cadastro\Cadastro.mdb"

Set daoDB36 = DBEngine(0).OpenDatabase(sPath)

Set rs = daoDB36.OpenRecordset("Cadastro")

Set Data1.Recordset = rs

End Sub

BUSCA

************************************

Private Sub cmdBuscar_Click()

Select Case OptVendedor = True

Case OptVendedor

Dim vVendedor As String

vVendedor= InputBox("Digite o nº do vendedor cadastrado:")

frmPrincipal.Show

frmPrincipal.Data1.Recordset.FindFirst "Vendedor Like'" & vVendedor & "'" ****** ERRO NESSA LINHA

Unload Me

If frmPrincipal.Data1.Recordset.NoMatch = True Then

MsgBox "Este vendedor não foi encontrado!!!"

frmPrincipal.Show

Unload Me

End If

End Select

End Sub

***********************

OBRIGADO PELA AJUDA

ALEX

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152k
    • Total Posts
      651.6k
×
×
  • Create New...