472,953 Members | 1,824 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,953 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 1798
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: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...

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.