By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,986 Members | 2,042 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,986 IT Pros & Developers. It's quick & easy.

Forcing "Blank" to the beginning of a query

P: n/a
Hi:

I have a query which supports a form. Te form is used to edit, update and change records
in the table the query is based on. It all works fine EXCEPT that the "New" record (blank
updatable record) always appears as the end of the form (i.e. the bottom), whereas it
would be very helpful if it appeared at the beginning (the top of the form).

Can anyone suggest a way to make this happen?

Regards

John Baker
Nov 12 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
This is not exactly what you asked form but it might help:

You could set the form to "Data Entry". This opens the form to a new
record, and does not show existing ones. As records are added, it lets
you see only those you just added since opening the form.

The Data Entry property is on the Properties box, Data tab. You can
also set it via VBA code.

John Baker wrote:
Hi:

I have a query which supports a form. Te form is used to edit, update and change records
in the table the query is based on. It all works fine EXCEPT that the "New" record (blank
updatable record) always appears as the end of the form (i.e. the bottom), whereas it
would be very helpful if it appeared at the beginning (the top of the form).

Can anyone suggest a way to make this happen?

Regards

John Baker

Nov 12 '05 #2

P: n/a
I don't think that's a behaviour that can be changed. As by default,
records are added to the end of the table, and indexes are just ways to
order them when they are displayed.

Mike Storr
www.veraccess.com

"John Baker" <Ba******@Verizon.net> wrote in message
news:3h********************************@4ax.com...
Hi:

I have a query which supports a form. Te form is used to edit, update and change records in the table the query is based on. It all works fine EXCEPT that the "New" record (blank updatable record) always appears as the end of the form (i.e. the bottom), whereas it would be very helpful if it appeared at the beginning (the top of the form).
Can anyone suggest a way to make this happen?

Regards

John Baker

Nov 12 '05 #3

P: n/a
Mike is correct!

You can simulate what you want however in two ways.
Turn AllowAdditions off.
1. Place a row of unbound text boxes above your form for entering new records.
You can use a button or the AfterUpdate of the last textbox to:
a) Turn Allow Additions on
b) Add the contents of the textboxes to your table
c) Turn Allow Additions off
d) Requery your form to show the new record
e) Set all the textboxes to Null

2. Place a subform with Data Entry set to Yes, only one row displayed and
based on the same table above your form for entering new records. You can use a
button or the AfterUpdate of the last textbox in the subform to:
a) Turn Allow Additions on
b) Go to new record to save what was entered in the subform
c) Turn Allow Additions off
d) Requery your form to show the new record
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

"John Baker" <Ba******@Verizon.net> wrote in message
news:3h********************************@4ax.com...
Hi:

I have a query which supports a form. Te form is used to edit, update and change records in the table the query is based on. It all works fine EXCEPT that the "New" record (blank updatable record) always appears as the end of the form (i.e. the bottom), whereas it would be very helpful if it appeared at the beginning (the top of the form).

Can anyone suggest a way to make this happen?

Regards

John Baker

Nov 12 '05 #4

P: n/a
DFS
In addition to the good suggestions by other cdma masters, you can place an
option group on the form, and add two option buttons:

* View Data (default option)
* Add Record

In the AfterUpdate event of the option group itself (call if frameData), add
code:

When you click the View Data option button (frameData = 1), set the subform
DataEntry = False and requery it
When you click the Add Record option button (frameData = 2), set the subform
to DataEntry = True

Your subform should have AllowAdditions = True. Thus the user can scroll to
the bottom to add a record, or click the option button and add it at the
top.

"John Baker" <Ba******@Verizon.net> wrote in message
news:3h********************************@4ax.com...
Hi:

I have a query which supports a form. Te form is used to edit, update and change records in the table the query is based on. It all works fine EXCEPT that the "New" record (blank updatable record) always appears as the end of the form (i.e. the bottom), whereas it would be very helpful if it appeared at the beginning (the top of the form).
Can anyone suggest a way to make this happen?

Regards

John Baker

Nov 12 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.