473,414 Members | 1,690 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,414 software developers and data experts.

Help needed in adding records

Ron
Hi all,

I've got a frmCustomer form (designed via access 2000 form wizard) that uses
a qryCustomerName query (also designed by query wizard) ordered by customer
last name, first name, mi. Of course, it adds records to the end of the
dataset rather than putting new entries into alpha order. And, there they
sit until I leave the form and re-enter it.

Is there a way to input the new record so that once it's entered it pops it
into alpha order, without having to leave the form and re-enter it, or
clicking a key to re-query (and thus put the user back to the beginning of
the file)?

TIA
ron
Apr 14 '06 #1
4 1456
Ron:

You can add this line to the code of the AfterInsert event of the Form:

Me.Requery

Note: This will take the user back to the first record of the data
set.

HTH,
Jana

Apr 14 '06 #2
Ron
Hi Jana,

Thanks for trying to help. As I indicated though, for other reasons, it's
REALLY cumbersome to have the user save the record and then pop back to the
first record in the query rather than still be at the record they just
added. VERY cludgy.

As with other attributes that seem to make Access almost useless, I'll try
and figure out a way around this problem as well. The way that Access seems
to work right out of the box, I might have found it easier to keep track of
records with an IBM typewriter.

Again, thanks for trying to help.
ron

"Jana" <Ba********@gmail.com> wrote in message
news:11**********************@i39g2000cwa.googlegr oups.com...
Ron:

You can add this line to the code of the AfterInsert event of the Form:

Me.Requery

Note: This will take the user back to the first record of the data
set.

HTH,
Jana

Apr 15 '06 #3
"Ron" <ro*******************@earthlink.com> wrote
I've got a frmCustomer form (designed via access 2000 form wizard) that
uses a qryCustomerName query (also designed by query wizard) ordered by
customer last name, first name, mi. Of course, it adds records to the end
of the dataset rather than putting new entries into alpha order. And,
there they sit until I leave the form and re-enter it.
Yes, indeed, "of couse," is the operative phrase. Relational Tables (which
is what Access tables are) are, by definition, UNordered. You have to use a
Query that Sorts them when you want to make use of the Tables, such as
display the information to humans.

Larry Linson

Is there a way to input the new record so that once it's entered it pops it into alpha order, without having to leave the form and re-enter it, or
clicking a key to re-query (and thus put the user back to the beginning of the file)?

Apr 16 '06 #4
Ron
Thanks for helping me find a solution that seems to be working.

I used your requery, but before I did, I made a variable equal to the
customer number assigned to the new customer. I requery, then use
FindRecord to pop back to the appropriate record.

varCustNo = Me.CustomerNumber
Requery
DoCmd.GoToControl "CustomerNumber"
DoCmd.FindRecord varCustNo, , False, , False, acCurrent

May not be elegant, but it seems to work. I'll continue to play with it.

Thanks, Jana!
ron

"Jana" <Ba********@gmail.com> wrote in message
news:11**********************@i39g2000cwa.googlegr oups.com...
Ron:

You can add this line to the code of the AfterInsert event of the Form:

Me.Requery

Note: This will take the user back to the first record of the data
set.

HTH,
Jana

Apr 17 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ralph Freshour | last post by:
I'm not sure the follow multiple table query is the right way to do what I need to do although it seems to be working: $php_SQL = "SELECT * ". "FROM basics, personal, photos ". "WHERE...
0
by: abcd | last post by:
kutthaense Secretary Djetvedehald H. Rumsfeld legai predicted eventual vicmadhlary in Iraq mariyu Afghmadhlaistmadhla, kaani jetvedehly after "a ljetvedehg, hard slog," mariyu vede legai pressed...
9
by: netpurpose | last post by:
I need to extract data from this table to find the lowest prices of each product as of today. The product will be listed/grouped by the name only, discarding the product code - I use...
3
by: Abhas | last post by:
> > Hi, this is Abhas, > > I had made a video library program in C++, but was facing a problem. > > After entering 12 movies, i cannot enter any more movies. > > Something gibberish comes instead....
28
by: stu_gots | last post by:
I have been losing sleep over this puzzle, and I'm convinced my train of thought is heading in the wrong direction. It is difficult to explain my circumstances, so I will present an identical...
8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
11
by: my-wings | last post by:
I think I've painted myself into a corner, and I'm hoping someone can help me out. I have a table of books (tblBooks), which includes a field (strPubName) for Publisher Name and another field...
6
by: lennon1 | last post by:
Hi, I have already started learning .NET and I have a question. If I want to do anything - Display Data, Navigate, Update - with database (SQL Server) in Visual Studio 2005, do I have to use all...
15
by: Jay | last post by:
I have a multi threaded VB.NET application (4 threads) that I use to send text messages to many, many employees via system.timer at a 5 second interval. Basically, I look in a SQL table (queue) to...
10
by: 60325 | last post by:
This is the page where I collect the data in drop-down boxes with values of 1-10 and send it to a submitted page to do calculations. Example: Employee1 TeamScore(1-10) Employee2 ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.