date type

G

Guest

hello..
i got a subform, linked to the main form by a field called "date".
the problem is the type of date inside the subform is "DD/MM/YYYY HH:MM:SS",
and the one on the main form is "DD/MM/YYYY".
as the information on the subform cames from another database, can't change
the type of date.
i had try, without success, puting the format of the date as "short date",
but in reality, it just workes visualy, the time still there and the link
doesn't work.
do you know how to separate a date type "DD/MM/YYYY HH:MM:SS" into to
separate fields like "DD/MM/YYY" and "HH:MM:SS".
im open to other ideas


thank you.
 
W

Wayne Morgan

It is possible to use the value of a control for the link, not just field
names. It would probably also be possible to just use an expression for the
link value, although I haven't tried this. If the second option doesn't
work, create a hidden text box to link on and place the expression in the
text box.

The Format command returns a string. You may need to wrap it in CDate to
change it back to a date. Another option comes from the way dates are
stored. Here is an example from the Immediate window.

?Int(#3/12/2004 12:03 PM#)
3/12/2004

Also, you shouldn't use Date as a field or control name, it is a reserved
word. If you do use it, make sure you always enclose it in brackets to
prevent possible conflicts with Date().
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top