Hello,
I have been searching all over for an answer to this, and so far found nothing.
The date variable in VBA can store date and time together. So to make my table smaller and easier to modifiy I have decided to store date and time values in the same feild, using textboxes to 'extract' the required part when needed.
I have a form connected to a table with my date/time field which will be hidden, and there are then 2 seperate boxes for Date and Time input. On load, both textboxes are populated with their respective values from the hidden textbox which works fine. But when the user modifieds either box, and clicks a button, VBA should add both time and date into the hidden connected field together, the issue is no matter what i try I keep getting miss-match errors. Have tried different, and no, formats on all/each textboxes and adding formats to VBA ect... and nothing has worked.
Code currently looks like this;
And for reference - onload code that works fine looks like this;
Any help would be hugly appreciated as it would save me having to add many more feilds to my table
P
I have been searching all over for an answer to this, and so far found nothing.
The date variable in VBA can store date and time together. So to make my table smaller and easier to modifiy I have decided to store date and time values in the same feild, using textboxes to 'extract' the required part when needed.
I have a form connected to a table with my date/time field which will be hidden, and there are then 2 seperate boxes for Date and Time input. On load, both textboxes are populated with their respective values from the hidden textbox which works fine. But when the user modifieds either box, and clicks a button, VBA should add both time and date into the hidden connected field together, the issue is no matter what i try I keep getting miss-match errors. Have tried different, and no, formats on all/each textboxes and adding formats to VBA ect... and nothing has worked.
Code currently looks like this;
Code:
Me.Arrival1.Value = Me.arivaldate.Value + Me.arrivaltime.Value
And for reference - onload code that works fine looks like this;
Code:
Me.arivaldate.Value = Format(Me.Arrival1.Value, "dd/mm/yyyy")
Me.arritime.Value = Format(Me.Arrival1.Value, "hh:mm")
Any help would be hugly appreciated as it would save me having to add many more feilds to my table
P