dbTalk Databases Forums  

Start entering in middle of field on a form

comp.databases.ms-access comp.databases.ms-access


Discuss Start entering in middle of field on a form in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
ShadesOfGrey
 
Posts: n/a

Default Start entering in middle of field on a form - 09-27-2011 , 11:53 AM






Hello folks. I used to know this trick but I've forgotten it.

I'm using a form to enter a field that is of the format ZZ-YYYY-####
where ZZ is a fixed alphanumeric (it will always be "04" for this
database), YYYY is a calculated 4-digit number based on the year (it's
our fiscal year, which starts in October) and #### is a manually-
entered 4-digit number that I would like to default to the previous
record's ####+1.

So, if record one is 04-2011-0000, when I enter a new record, I want
the cursor to position after the second - and the default field to be
"04-2011-0001". Right now the default shows up as "04-2011-****" but
I have to hit F2 and arrow back to the first * to start entering in
the correct place.

How can I do this?

Reply With Quote
  #2  
Old   
christianlott1@yahoo.com
 
Posts: n/a

Default Re: Start entering in middle of field on a form - 09-29-2011 , 09:37 AM






On Sep 27, 11:53*am, ShadesOfGrey <stan.mitche... (AT) gmail (DOT) com> wrote:
Quote:
Hello folks. *I used to know this trick but I've forgotten it.

I'm using a form to enter a field that is of the format ZZ-YYYY-####
where ZZ is a fixed alphanumeric (it will always be "04" for this
database), YYYY is a calculated 4-digit number based on the year (it's
our fiscal year, which starts in October) and #### is a manually-
entered 4-digit number that I would like to default to the previous
record's ####+1.

So, if record one is 04-2011-0000, when I enter a new record, I want
the cursor to position after the second - and the default field to be
"04-2011-0001". *Right now the default shows up as "04-2011-****" but
I have to hit F2 and arrow back to the first * to start entering in
the correct place.

How can I do this?
TextBox.SelStart Property
Mid$
?

Reply With Quote
  #3  
Old   
Bob Quintal
 
Posts: n/a

Default Re: Start entering in middle of field on a form - 09-29-2011 , 04:07 PM



ShadesOfGrey <stan.mitchell1 (AT) gmail (DOT) com> wrote in
news:a47f2760-df7d-4af0-a2c5-14d33fdb8349 (AT) j1g2000yqj (DOT) googlegroups.com
:

Quote:
Hello folks. I used to know this trick but I've forgotten it.

I'm using a form to enter a field that is of the format
ZZ-YYYY-#### where ZZ is a fixed alphanumeric (it will always be
"04" for this database), YYYY is a calculated 4-digit number based
on the year (it's our fiscal year, which starts in October) and
#### is a manually- entered 4-digit number that I would like to
default to the previous record's ####+1.

So, if record one is 04-2011-0000, when I enter a new record, I
want the cursor to position after the second - and the default
field to be "04-2011-0001". Right now the default shows up as
"04-2011-****" but I have to hit F2 and arrow back to the first *
to start entering in the correct place.

How can I do this?

You should not let the user enter this in ONE field, it should be
THREE separate textboxes in the form.

And they really should not be editable by a user.

You then use a calculated field in queries, forms and reports for
display.

--
Bob Q.
PA is y I've altered my address.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.