Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Format Table field prefix for autonumber

Status
Not open for further replies.

justagrunt

Technical User
Oct 10, 2002
132
0
0
Hi,
Using select statement as suggested in a previous post I was able to format an auto fields prefix, but find the format would not stay when the form was reopened as the base tables feild format held nothing.
Select Case Me!Frame20
Case 1
Forms![Works Card Form]![Works No:].Format = ">A-" 'NSW

Case 2
Forms![Works Card Form]![Works No:].Format = ">V-" 'VICTORIA
.......... to

Case 7

Forms![Works Card Form]![Works No:].Format = ">E-" 'ENGINEERING SHOP

End Select



The prefix held on the initial form, but not once saved or reopened to the refernce number the prefix had gone.
Is it possible to format a tables field value to say >"B-" etc on selection of an input from a pop up table with option group selection and select case statement.

Would the code be
Table![Works Card Form]![Works No:].Format = ">V-" 'VICTORIA

Warm Regards
Bill


 
Table![Works Card Form]![Works No:].Format = ">V-" 'VICTORIA
Do not format in the table format on views in forms and reports.

Something like this
me!YrFld = Left(Me![Works No:],1) '">V-" 'VICTORIA

Also AND this is NONE of my business!

But you should think about your selection of names in your app for fields, tabels, etc. etc.
I would use single word names like:
WorksCardForm and WorksNo has the same effect, in my view anyway, but it saves you a whole lot of [] and "" etc.


Herman
Say no to macros
 
Thanks Herman,
Name selection was one of those things that happened right at the start when trial and error and know knowledge were in abundance and ignorance was bliss.
Thanks
Bill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top