Week selection within a drop down box

JeffreyDavid

Registered User.
Local time
Today, 11:31
Joined
Dec 23, 2003
Messages
63
:confused:
I have a form with a text box, which auto-populates with the current date when a particular drop down box says 'Ordered'. I have another drop down box which I want to list a choice of ship dates, like 2 - 4 Weeks, 3 - 5 Weeks. I am having a problem listing the weeks in a drop down box as a Date data type, you are NOT allowed to have a '-' like '2 - 4 weeks'.
I want to be able to select say '2 - 4 Weeks' and have it add 4 weeks onto the Current Date text box and have it display in another text box.
Does anyone know what I mean?
Is this posible?
 
Create a new table with two columns, “I D” and “Description” in the “ID” column have 1, 2, 3, 4, etc and in the description have, 2 - 4 Weeks, 3 - 5 Weeks, etc. now base your combo box on this table. Call your combo box something like “cboDelivery”.
You should have an order date text box “txtOrdDate” and another text box to record the delivery date “txtDelivery” now you need some code in the after update event of your combo box.
In the after update event of your combo box put a case statement to something like this.

Select Case cboDelivery
Case 1
txtDelivery = txtOrdDate + 28
Case 2
txtDelivery = txtOrdDate + 35


Case Else
msgBox “Error in Case statement”
End Select
 
Tony, you beat me to that one! I originally did it with values manually input into the CBO but a table makes more sense, updating it is easier.
 
Well thank you! I’ll take that as a compliment from a most exalted forum number such as yourself.
 
Tony Hine said:
I’ll take that as a compliment from a most exalted forum number such as yourself.

That is really funny.... :p
 
Your really getting the hang of Brit humor, I can tell... :D :D :D
 

Users who are viewing this thread

Back
Top Bottom