BINGO!!!
it works
many many thanks
here is the code i am using:
Public Function InfoDate(GivenDate As Date) As String
Dim date1 As String
date1 = Format(GivenDate, "dd/mm/yy")
InfoDate = Nz(DLookup("long_y", "datesqry", "formateddate = '" & date1 & "'"))
End Function
you made my day (week)
its a huge database
but here are a few ideas i tried:
Public Function InfoDate(GivenDate As Date) As String
Dim UsingGivenDate As Date
Dim DateStringPass As String
UsingGivenDate = Format(GivenDate, "dd/mm/yy")
'Dim stringOFTodaysDate As String
'Dim Dan As Variant
'Dim convertedString As...
thanks for taking your time to help me!
"Date" is reffering to, either the Date literal which means Date(), or a valid date expression.
i did your advice, i used nz(...)
it returns nothing...
so it actualy does not get any value from th etable.
it does not for me with dlookup
i tried to get it...
i have a table named DatesTbl
within it i have a field named Date_E with many dates in it
then more fields with other text relating to those dates,
i want to find the info of the other fields by passing a date value to a function and getting back the values of the other fields which are matching...
i have a table named DatesTbl
within it i have a field named Date_E with many dates in it
then more fields with other text relating to those dates,
i want to find the info of the other fields by passing a date value to a function and getting back the values of the other fields which are matching...
i have a table with a date field in it, set as short date, and a field for a NAME
then i have a form with a command button to change the date for a new date which is the beginning of the next week.
i used the following code:
dim TodayDate As Date
dim StrSql as String
TodayDate = Format((Date -...