Bosanec | 17.02.2013 20:20 |
---|---|
Predmet:problem sa datumom u vba Pozdrav imam problem sa ovim uslovom u vba uslov = "SELECT * FROM tblPK WHERE (tblPK.periodD)= " & "#" & Format(Me.[Datum], "dd/mm/yy") & "#" javlja mi grešku syntax eror in date in query u čemu je problem |
Amelasar | 17.02.2013 20:24 |
---|---|
Predmet:Re: problem sa datumom u vba Probaj ovako: uslov = "SELECT * FROM tblPK WHERE (tblPK.periodD)= " & "#" & Format(Me.[Datum], "dd-mm-yyyy") & "#" |
Bosanec | 17.02.2013 20:38 |
---|---|
Predmet:Re: problem sa datumom u vba neće ni tako greška no curent record |
zxz | 17.02.2013 20:47 |
---|---|
Predmet:Re: problem sa datumom u vba Dim DatumS as string DatumS="#" & Format(Me.datum,"mm-dd-yyyy") & "#" Uslov="SELECT * FROM tblPK WHERE periodD=" & Datums |
Bosanec | 17.02.2013 21:24 |
---|---|
Predmet:Re: problem sa datumom u vba Dim DatumS as string DatumS="#" & Format(Me.datum,"mm-dd-yyyy") & "#" Uslov="SELECT * FROM tblPK WHERE periodD=" & Datums ovako hoće hvala zxz a hoće i ovako pomoću ove funkcije Function SQLDate(varDate As Variant) As String 'Purpose: Return a delimited string in the date format used natively by JET SQL. 'Argument: A date/time value. 'Note: Returns just the date format if the argument has no time component, ' or a date/time format if it does. 'Author: Allen Browne. allen@allenbrowne.com, June 2006. If IsDate(varDate) Then If DateValue(varDate) = varDate Then SQLDate = Format$(varDate, "\#mm\/dd\/yyyy\#") Else SQLDate = Format$(varDate, "\#mm\/dd\/yyyy hh\:nn\:ss\#") End If End If End Function e jesam se pošteno namučio ![]() pozdrav |
zxz | 17.02.2013 21:39 |
---|---|
Predmet:Re: problem sa datumom u vba Ima negdje napisano o ovome na forumu. SDQL prihvata samo americki datum i samo je to bila greska. Znaci datum mora biti: mjesec-dan-godina |