473,320 Members | 1,794 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Forcing "Blank" to the beginning of a query

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
4 1820
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

235
by: napi | last post by:
I think you would agree with me that a C compiler that directly produces Java Byte Code to be run on any JVM is something that is missing to software programmers so far. With such a tool one could...
1
by: John | last post by:
Hi I need to print "blank" invoices with invoice numbers only at the top. I have a table full of invoice numbers which I am using as the record source for the invoice report. I have placed the...
11
by: MLH | last post by:
If this is what MySQL is set to... SELECT DISTINCTROW qryVehiclesNowners5.SerialNum, qryVehiclesNowners5.VDescr, qryVehiclesNowners5.Owner, qryVehiclesNowners5.VehicleJobID ,...
1
by: James Pang | last post by:
myProcess.StartInfo.FileName==@"C:\WINDOWS\system32\ping.exe 10.0.0.1"; //this will not work cant find file name... myProcess.StartInfo.FileName==@"C:\WINDOWS\system32\ping.exe"; //this works...
4
by: sid | last post by:
"about:blank" oepns new browser window I am writing a webpage that will run on other machines that I may or may not know about. My page is framed where frame1 controls the content of frame2. ...
1
by: sid | last post by:
I am writing a webpage that will run on other machines that I may or may not know about. My page is framed where frame1 controls the content of frame2. What I have found is that if the page in...
17
by: teser3 | last post by:
I can put out a Word Doc from PHP but if I try and manipulate the font size in the PHP part it outputs a blank Word Document. Here is what I have: <?php $fname="report.doc"; $handle = fopen(...
0
by: crankeboy | last post by:
Hi Folks, My setup: Visual Studio Express 2008, VC++, .NET, BitBlt Here is a summary of the problem: - I am trying to copy a bitmap of my main form into a picture box. - To do this, I bitblt...
5
by: dougmeece | last post by:
I have two forms with one calling the other to perform searches. When I run the search form the 2nd form a blank record is added to my table. The table is appended or updated from entries on the...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.