Is the following correct?
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70 ' to save
DoCmd.GoToRecord , , acNext ' to auto next
Me.Requery ' requery for the hell of it
shiznaw
2 1343
Most people use
DoCmd.RunCommand acCmdSaveRecord
now instead of
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
to save a record. The older code is still used by the Command Button Wizard, and still works, but may be phased out in future versions.
The line
DoCmd.GoToRecord , , acNext
isn't needed to save the record.
Me.Requery
will put the new record in its proper place within the recordset, if you will. If records are sorted alphabetically, say, by a person's name, the new record will now be in the correct alphabetical position. If the Requery isn't done, the new record will be at the end of the recordset.
To sum up,
DoCmd.RunCommand acCmdSaveRecord
Me.Requery
will save the new record and put the new record in its proper place.
Most people use
DoCmd.RunCommand acCmdSaveRecord
now instead of
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
to save a record. The older code is still used by the Command Button Wizard, and still works, but may be phased out in future versions.
The line
DoCmd.GoToRecord , , acNext
isn't needed to save the record.
Me.Requery
will put the new record in its proper place within the recordset, if you will. If records are sorted alphabetically, say, by a person's name, the new record will now be in the correct alphabetical position. If the Requery isn't done, the new record will be at the end of the recordset.
To sum up,
DoCmd.RunCommand acCmdSaveRecord
Me.Requery
will save the new record and put the new record in its proper place.
Thanxs for clarifying. I needed that. so, umm....you guys should start charging!
shiznaw
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Michael Onfrek |
last post by:
Hi!
I'm playing with entry again and trying to restrict length of entry
widget to certain number of character, so users cannot enter more
character into it. Any ideas?
Reg. Michael Onfrek
|
by: LC |
last post by:
Hi,
I would like to know how I can save my current ASP page
to the server side in html file format.
Then I would like to stream it back to the client side.
Any help is very much...
|
by: LC |
last post by:
Hi,
Many Weeks ago I posted this:
I would like to know how I can save my current ASP page
to the server side in html file format.
I got a very nice reply back from Scott McNair. Thank
you...
|
by: DMD |
last post by:
How do I determine the column associated with the current edit location within a RichTextBox? The following code allow
me to determine the current line
txtLineNumber.Text =...
|
by: Richard L Rosenheim |
last post by:
I'm trying to create a style sheet to generate HTML output, based upon some
XML data.
I'm grouping some data, and I'm trying to get the very first entry either
just passed as a parameter, or...
|
by: sghi |
last post by:
Hi All,
I'm new to this group and quite new to access/vba.
So, shortly after beginning to write a simple application for my wife,
I came across a blocking problem: I need to intercept the sql...
|
by: jd_12345 |
last post by:
On DB2 on AIX, I'm attempting to retrieve the most recent ID for each
unique Code based on its EffectiveDate. For example, in the data
below, I want to retrieve ID BE0191026 as it has the most...
|
by: Gilberto |
last post by:
Hello
I have a form where the user enters some pricing information. I need to store in the pricing table (fields time and date) the time and date WHEN the information was entered, so that later...
|
by: theGeek |
last post by:
Hi All,
I want to save the current page using javascript(in asp.net). Though I could find out that the "execCommand" can do that but the only options for file types that are available in the save...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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,...
|
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,...
|
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...
|
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...
| |