Pass date from one form to another form in MS Access

Joined
Sep 11, 2014
Messages
1
Reaction score
0
Let me say this up front my ability and knowledge in Acess is just about nothing.
I am entering information into records and I want the dates to be the same on each record I create in the Series.
What I have done is create a date form that I enter my dates on.
Then I click a button to open the second form.

On the first form I enter the dates 02/01/2014, 03/01/2014 & 04/01/2014
Below is the code

If IsOpen("frmbilldates") Then
MsgBox ("date from date form" & Forms!frmbilldates!BillDate) This date appears just like it should 04/01/2014
fldBillDate.DefaultValue = Forms!frmbilldates!BillDate
MsgBox ("billing info date" & [fldBillDate]) This date appears as 12:03:34 in the message box
ServiceFrom.DefaultValue = Forms!frmbilldates!servfromdate
ServiceTo.DefaultValue = Forms!frmbilldates!servtodate
End If

On the second form the dates appear as 12/30/1899 on all three fields.
Any thoughts or suggestion on what I can do to correct this?
Any help is GREATLY APPRECIATED
 
Joined
Oct 3, 2014
Messages
16
Reaction score
1
Try this: Forms!frmbilldates!format(servfromdate, "mm-dd-yyyy") - depending on the format you want you should replace the mm and dd for months and days.
 

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