DateAdd problems

swift

Registered User.
Local time
Today, 14:48
Joined
Mar 12, 2006
Messages
67
Hello,

Having problems with the DateAdd function....I've looked around the forum and found some useful things but as usual I'm stuck with it!!

On my form I have a field containing a 'sampling date'. I have a combo box numbered 1 to 56, so the user can select the age in days of the test. The number selected from the combo box needs to be added to the 'sampling date' to produce a 'test date'.
I then need all of these fields available to put on a report and also in another form.

The DateAdd function so far is working ok but it relies on the user inputting the 'sampling date' into a text box to run the DateAdd function. I already have the sampling date available on the form and would like to just autofill the 'test date' box based on the user selecting the 'age' from the combo.

Unfortunately I'm having real problems with this, can anybody help?

Thanks in advance,

swifty:)
 
What code do you have in the AfterUpdate event of the ComboBox? It should look something like:
Me.txtTestDate = DateAdd("d", Me.ComboBox, Me.txtSamplingDate)
...using your control names of course.
 

Users who are viewing this thread

Back
Top Bottom