update text box via combo box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

On a form i have a combo box which selects workorder status eg, open, waiting
payment, closed etc. Below it i have a text box for the status date. What i
want to do is every time i select a new status within the status combo box i
want the current date to be displayed in the text box.

Can anyone help?
 
You make it look so easy, im still trying to get my head around the
expression builder. if you know any good sites with info on on how to use
expression builder i would appreciate the address.

Many thanks for your help.
 
i have done as you surgested but i get this erro message.

Microsoft Access cant find the marco 'NameOfYourTextBox'.
 
I rarely use the expression builder, and I do not know of any web sites that
document, explain or even recommend its use.

I would recommend that you consider purchasing a book or two that you can
use as a reference. Opinions vary, but for my money I believe the best
Access reference book is "Access (your version here) Developers Handbook by
Gilbert, Getz, and Litwin.
http://www.amazon.com/exec/obidos/search-handle-form/104-5083014-1181564

This book has paid for itself time and again when I was in a jam. A book
also allows one to continue to assimilate knowledge even when they are NOT
in front of the computer. And as a bonus there is nothing like the heft of
a 900 page book, used as a paperweight, to keep the unpaid bills from
blowing off of ones desk:-)

Ron W
www.WorksRite.com
 
Try substituting the actual name of the text box you want the status date to
be in for the expression NameOfYourTextBox. So if the text box name was
Text1, then the expression would be Text1.Value = Date. This is a pretty
standard construct of either "Some Variable or Ojbect Dot Property" =
"Ojbect Dot Property" or "Ojbect Dot Property" = "Some Variable or Ojbect
Dot Property or Function()".

Ron W
www.WorksRite.com
 
the actual name of the text box was substituted. Checked for spaces but still
get error message
 
Paste the all of the code in the subroutine that the error occurs on and the
Error message you are getting.

Assuming that your Combo box name is cboStatus and the text box name is
txtStatusDate then it should look like

Private Sub cboStatus_AfterUpdate()
txtStatusDate.Value = Date
End Sub

Ron W
www.WorksRite.com
 
try
NameOfYourTextBox.Value = Date()

Ron Weiner said:
I rarely use the expression builder, and I do not know of any web sites that
document, explain or even recommend its use.

I would recommend that you consider purchasing a book or two that you can
use as a reference. Opinions vary, but for my money I believe the best
Access reference book is "Access (your version here) Developers Handbook by
Gilbert, Getz, and Litwin.
http://www.amazon.com/exec/obidos/search-handle-form/104-5083014-1181564

This book has paid for itself time and again when I was in a jam. A book
also allows one to continue to assimilate knowledge even when they are NOT
in front of the computer. And as a bonus there is nothing like the heft of
a 900 page book, used as a paperweight, to keep the unpaid bills from
blowing off of ones desk:-)

Ron W
www.WorksRite.com
 
Thank you

Doing in Code builder has worked. I dont know why i couldnt get it working
in expression builder but i will investigate.

Many Thanks to you, your on my xmas list
 
Back
Top