[AccessD] Subform => New Record first?

John Colby jcolby at colbyconsulting.com
Fri Oct 24 09:40:58 CDT 2003


Andy,

I usually have the button place the form in Data entry mode (filter out the
existing records).  To do this, store the current values for Data Entry and
Allow Additions, then set DataEntry Yes / Allow Additions Yes, then in after
update of the form set these properties back to their original values, and
finally requery the form.

John W. Colby
www.colbyconsulting.com

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Andy Lacey
Sent: Friday, October 24, 2003 10:00 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Subform => New Record first?


Sander
I know what you mean. My users often don't like this either. The answer to
your question is no (I think) but a workaround is to place a command button
in the header called "Add New Record" or whatever and behind there put:

DoCmd.GoToRecord , , acNewRec

It still goes to the bottom of the list but at least the user doesn't have
to scroll down.

There is another technique which may work but depends on your data to an
extent. If, say, the data your subform is bound to has a date created field,
and if your user is happy to see the data in desc order of date (ie newest
at the top), then you can do the following:

DoCmd.GoToRecord , , acNewRec
me!DateField=Now()
me.requery

This will add the new record with the latest date then the requery will sort
it to the top. Doesn't always suit, but can sometimes be effective.

--
Andy Lacey
http://www.minstersystems.co.uk




--------- Original Message --------
From: "Access Developers discussion and problem solving"
<accessd at databaseadvisors.com>
To: "Acces User Group" <accessd at databaseadvisors.com>
Subject: [AccessD] Subform => New Record first?
Date: 24/10/03 13:37


Hi group,

I've got a subform. When I scroll through the records
it is possible to add a record. However I first have
to tab through all records (or use the scrollbar).

Is it possible to have the new line (to insert a new
record) appear on top (as the first line)?

So you see an empty line and below it are all
detailrecords.

Hope this makes sence.

TIA

SD

__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

________________________________________________
Message sent using UebiMiau 2.7.2

_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com





More information about the AccessD mailing list