UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Combobox Changing    
 
   
tiktik2x
post Mar 31 2012, 08:15 PM
Post #1

New Member
Posts: 7



good day (IMG:style_emoticons/default/smile.gif)

is it possible that a combo box changing everyday?

for example i have a combo box Day and the values are Monday to Saturday

what if the Day today is Monday and the combo box change into Monday

Thanks for any help (IMG:style_emoticons/default/smile.gif)
Go to the top of the page
 
+
GroverParkGeorge
post Mar 31 2012, 08:38 PM
Post #2

UA Admin
Posts: 19,246
From: Newcastle, WA



What are you hoping to accomplish? What is the reason for this change?
Are you trying pre-select the day value in a combo box? Or are you trying set a default value for the combo box?

It seems to me that, if the goal is to select the current day for this combo box, it's not really necessary to have a combo box at all. You can just return the current weekday to a text box.

Use can use the Format() command to generate a string for the current date: Format(Date(),"dddd")
Go to the top of the page
 
+
tiktik2x
post Mar 31 2012, 08:59 PM
Post #3

New Member
Posts: 7



i have a PC units that might available on the selected day..
im not going to pre select the value in the combo box...
what i mean is to automatically changing the value of the combo box every other day

is it posible? what is the other way to do this

thank you sir (IMG:style_emoticons/default/smile.gif)
Go to the top of the page
 
+
GroverParkGeorge
post Mar 31 2012, 09:14 PM
Post #4

UA Admin
Posts: 19,246
From: Newcastle, WA



Please bear with me here. I am still not sure I completely understand.

A combo box contains a LIST of values, not a single value. So I assume what you want to do is select one of the values in the list, based on the current day.

I also assume this list of values consists of 7 records, one for each of the days of the week (Monday through Sunday).

If you want to automatically select the current weekday in the combo box, you can do that with code like this in the form's current event.

CODE
Private Sub Form_Current()
  Me.cboYourWeekDayComboBoxNameGoesHere = Format(Date(),"dddd")
End Sub


That assumes your combo box actually contains weekday names (e.g., "Monday") and that you want to select those names.

HTH

Go to the top of the page
 
+
missinglinq
post Mar 31 2012, 10:01 PM
Post #5

UtterAccess Ruler
Posts: 2,661



QUOTE (tiktik2x @ Mar 31 2012, 09:15 PM) *
...is it possible that a combo box changing everyday?

...what if the Day today is Monday and the combo box change into Monday

...what i mean is to automatically changing the value of the combo box every other day


As David Letterman often has occasion to say,"What?" (IMG:style_emoticons/default/laugh.gif)
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 23rd May 2013 - 11:55 AM