-

   rss_sql_ru_access_programming

 - e-mail

 

 -

 LiveInternet.ru:
: 16.03.2006
:
:
: 4

:


, 10 2014 . 16:36 +

shed_doc - - - , , , , ,
shed_pat - - , , , , ,

shed_temp - 15 ( 30). / - - - - "" "" . , ( ), .. - .

- shed_temp .

( , shed_temp ) shed_temp - ( - + ...) - - ...

?


Public Function Shed_generate()

CurrentDb.Execute "DELETE * FROM Shed_temp ;"

Dim , , 1, , cdata As Date
Dim ccount, I As Integer
Dim rst As DAO.Recordset

Set rst = CurrentDb.OpenRecordset("Shed_temp", DAO.dbOpenDynaset)

cdata = Me.
ccount = DCount("", "", " = True ")

For I = 1 To ccount

= #8:00:00 AM#
= #7:45:00 PM#
= #12:15:00 AM#

Do
rst.AddNew
rst! = cdata
rst! =
rst! = +

1 = +

Me.ccab = I

rst! = Me.ccab

If DFirst("", "Shed_doc", "(= " & Me.ccab & ") and ( = #" & Format(cdata, "mm-dd-yyyy") & "#) and ( <= #" & & "#) and ( >= # " & 1 & " #)") > 0 Then
Me.csot = DFirst("", "Shed_doc", "(= " & Me.ccab & ") and ( = #" & Format(cdata, "mm-dd-yyyy") & "#) and ( <= #" & & "#) and ( >= # " & 1 & " #)")
Else: Me.csot = 1
End If

rst! = Me.csot

If DFirst("", "Shed_pat", "(= " & Me.ccab & ") and ( = #" & Format(cdata, "mm-dd-yyyy") & "#) and ( <= #" & & "#) and ( >= # " & 1 & " #)") > 0 Then
Me.ccli = DFirst("", "Shed_pat", "(= " & Me.ccab & ") and ( = #" & Format(cdata, "mm-dd-yyyy") & "#) and ( <= #" & & "#) and ( >= # " & 1 & " #)")
Else: Me.ccli = 1
End If

rst! = Me.ccli

1 = Null
= +

rst.Update

Loop Until >=

Next I

rst.Close
Set rst = Nothing

Me. = Format(, " Dddd, c")

End Function

http://www.sql.ru/forum/1081683/ubrat-vremennuu-tablicu-i-zamenit-ee-otvyazannym-rekordsetom


: [1] []
 

:
: 

: ( )

:

  URL