Hi I have a form which has a text box with date and a text box with a time. DD/MM/YYYY AND HH:NN:SS
In vba I have declared A as a date and done the following
A=Format([Textbox1] & " " & [Textbox2],"dd/mm/yyyy hh:nn:ss AM/PM")
msgbox (A)
msgbox shows everything but the AM/PM
Now I need need to pass this date to excel to do a vlookup which works if I do the following
A=#03/05/2013 11:26:00 AM#
but it wont work if I grab the date and time from the access form, I think it is because the AM/PM is missing. Please can someone help me I can post the full code if you like.
In vba I have declared A as a date and done the following
A=Format([Textbox1] & " " & [Textbox2],"dd/mm/yyyy hh:nn:ss AM/PM")
msgbox (A)
msgbox shows everything but the AM/PM
Now I need need to pass this date to excel to do a vlookup which works if I do the following
A=#03/05/2013 11:26:00 AM#
but it wont work if I grab the date and time from the access form, I think it is because the AM/PM is missing. Please can someone help me I can post the full code if you like.