-

   rss_sql_ru_access_programming

 - e-mail

 

 -

 LiveInternet.ru:
: 16.03.2006
:
:
: 4

:


, , VBA

, 07 2015 . 10:38 +
!
VBA , . , . . , . Run-time error 3061. . 3.
?

Option Compare Database
Option Explicit
Private Sub 5_Click()
Dim rstDati As DAO.Recordset
Dim qdfDati As QueryDef
Dim temp, fam As String
Const BoxTitle = " "
Dim dbeg, dfin As Date
'     
temp = InputBox("    ..", BoxTitle)
dbeg = temp
'dbeg = Format(dbeg, "dd mm yyyy")
temp = InputBox("    ..", BoxTitle)
dfin = temp
Set qdfDati = CurrentDb.CreateQueryDef("", "PARAMETERS db DateTime, df DateTime; " _
& "SELECT tbl.doprosa, tbl. FROM tbl " _
& "WHERE (((tbl.di) Between db And df));")
'     Recordset   
qdfDati.Parameters(0) = dbeg
qdfDati.Parameters(1) = dfin
Set rstDati = qdfDati.OpenRecordset()
If rstDati.RecordCount <> 0 Then
   rstDati.MoveFirst
   fam = rstDati![]
   MsgBox fam
End If
rstDati.Close
End Sub

http://www.sql.ru/forum/1150963/rabota-s-polem-dopuskaushhim-neskolko-znacheniy-v-kode-vba


: [1] []
 

:
: 

: ( )

:

  URL