RE: Autonumber - with text



Dave,

I'm following your example and on the form I'm getting an error. Where does
it refer to the table? I've created a table (Table1) with two columns -
IR_Year and IR_Number. Then I created a form with a text box and placed the
following in Control Source

=Right(CStr([IR_Year]),2) & CStr(Format([IR_Number],"0000"))

thx

"DaveT" wrote:

Not directly, but you can make it appear that way to users on reports and
forms.

I had similar issue with a quote program. Put two field in table:

QuoteYear, Default Value = Year(Date())
This plugs the year when record is added.

QuoteNumber, Autonumber

Then on form (or report), use text box with Control Source =
=Right(CStr([QuoteYear]),2) & CStr(Format([QuoteNumber],"0000"))

This would show, for example, 080251

In your case, add & "-" & , and you would get 08-0251


--
Dave Thompson
Allen, TX
US


"Bill" wrote:

Any way to create a auto number field with a text field in it? I have a
field called "RecordID" which is formated as XX-XXX (08-111). Since I need
the '-' dash in the field, it must be a text field. But I want it to
autonumber and I want to pick the number where it starts.

Any chance of this??

Thanks,

Bill
.



Relevant Pages

  • Re: Image control source linked to text box as descibed by Allen Brown
    ... Is your form bound to Table1? ... set the Control Source to just the field name ... Allen Browne for making the image control on a form display the image linked ...
    (microsoft.public.access.forms)
  • Re: Image control source linked to text box as descibed by Allen B
    ... Allen Browne - Microsoft MVP. ... the form is bound to Table1. ... set the Control Source to just the field name (omiting the ... Allen Browne for making the image control on a form display the image ...
    (microsoft.public.access.forms)
  • How to get field from lookup?
    ... Dlookup expressions in the control source property. ... If the primary key is in table1, ...
    (microsoft.public.access.formscoding)
  • Re: Synchronize Combo Box and Text Box
    ... Option Group that has a control source of tblTempVote. ... The Form is used to collect Vote data for an append query. ... SELECT Table1.TitleCode FROM Table1 LEFT JOIN tblVote ON ... sure you change the ColumnCount property to 2 and adjust the ...
    (microsoft.public.access.formscoding)
  • Re: Image control source linked to text box as descibed by Allen B
    ... Allen Browne - Microsoft MVP. ... the form is bound to Table1. ... set the Control Source to just the field name ... > Allen Browne for making the image control on a form display the image ...
    (microsoft.public.access.forms)