Format data / Continuous form

  • Thread starter Thread starter Alan
  • Start date Start date
A

Alan

I have numeric data (julian dates from an AS/400 table)
that I want to display in a bound text box on a form. An
example would be to display 104022 as 4/22/2004. I have
written code that converts the numeric data to a date in
plain text in the above format. I want to display the date
in the text box without actually changing the original
data. I also need to do this in a continuous form.

Any help would be greatly appreciated.

Thanks.
 
In you do have a working function that takes the value and correctly formats
it as you need, then in the continues form, simply create a new textbox, and
put the function name in as the text box source. (remember, don't name the
text box as a given field name, as that will just confuse access).

So, just make the data source of the text control like:

=(YourFunctionName([ThatStringTextFieldGoesHere]))

You cool function that you made can simply be put in a standard module, and
just make sure you declare it as public.
 
I have numeric data (julian dates from an AS/400 table)
that I want to display in a bound text box on a form. An
example would be to display 104022 as 4/22/2004. I have
written code that converts the numeric data to a date in
plain text in the above format. I want to display the date
in the text box without actually changing the original
data. I also need to do this in a continuous form.

Base the continuous Form on a Query; in the query, call your function
in a calculated field. I.e. just put

Textdate: YourFunctionName([JDate])

in a vacant Field cell. Use Textdate as the control source of a
textbox on the continuous form.

This will not be updateable, of course, since it's calculated - if you
need to be able to modify the JDate by typing a mm/dd/yyyy date you'll
need some code.
 
Back
Top