Changing Text to Default Value if text already has a value in it

N

nocty

Hello,

I am a student working on a project. My group has ran into a problem, one of
the requirements is to open a form that has a feild called
Completed_Order_Date, it asks to set the value to current date if the text is
null, I used =date() as the default value yet my test data that I entered
still comes up null. How do I enter the system date in a null value?

Also the other requirement is to change the order_status which is a combo box
from Pending or Active to "Completed" which is the default value of 4 in our
list. The preexisting value still shows up as Active or Pending when I want
it to show up as completed. Any help would be awesome.

Thanks
Justin
 
A

Arvin Meyer [MVP]

nocty said:
Hello,

I am a student working on a project. My group has ran into a problem, one
of
the requirements is to open a form that has a feild called
Completed_Order_Date, it asks to set the value to current date if the text
is
null, I used =date() as the default value yet my test data that I entered
still comes up null. How do I enter the system date in a null value?

You can use a calendar, like the one at:

http://www.datastrat.com/Download/Calendar2K.zip

or put some code in a button, like:

Private Sub cmdDate()
Me.txtNameOfControl = Date()
End Sub
Also the other requirement is to change the order_status which is a combo
box
from Pending or Active to "Completed" which is the default value of 4 in
our
list. The preexisting value still shows up as Active or Pending when I
want
it to show up as completed. Any help would be awesome.

Similar code to the above, but to write it for you, I need to know which
event triggers the change to Completed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top