I have an A97 application with a form (frmEditOwners).
Here's a code snippet for deleting current record...
Private Sub DelOwnerRecBtn_Click()
On Error GoTo Err_btnCloseOwnerEditForm_Click
Dim ThisForm As String, MyReply As Byte
ThisForm = Me.Name
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Exit_btnCloseOwnerEditForm_Click:
Exit Sub
Err_btnCloseOwnerEditForm_Click:
Dim r As String, k As String, Message3 As String
r = "The following unexpected error occurred in Sub
btnCloseOwnerEditForm_Click, line #" & Erl & ", CBF on " & ThisForm &
"."
k = CRLF & CRLF & str$(Err) & ": " & Quote & Error$ & Quote
Message3 = r & k
MsgBox Message3, vbExclamation, "Unexpected Error - " & MyApp$ &
", rev. " & MY_VERSION$
Resume Exit_btnCloseOwnerEditForm_Click
End Sub
There's some other syntax I should be using in place of the DoMenuItem
command, right? I believe the syntax show to be old Access 2.0 syntax.
What's the preferred syntax for the desired action? 1 1460
RunCommand is what you need to look up.
--
Nick Coe (UK) http://www.alphacos.co.uk/
AccHelp is now free/donateware
In news:jc********************************@4ax.com,
MLH typed: I have an A97 application with a form (frmEditOwners).
Here's a code snippet for deleting current record...
Private Sub DelOwnerRecBtn_Click() On Error GoTo Err_btnCloseOwnerEditForm_Click Dim ThisForm As String, MyReply As Byte ThisForm = Me.Name
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70 DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Exit_btnCloseOwnerEditForm_Click: Exit Sub
Err_btnCloseOwnerEditForm_Click: Dim r As String, k As String, Message3 As String r = "The following unexpected error occurred in Sub btnCloseOwnerEditForm_Click, line #" & Erl & ", CBF on " & ThisForm & "." k = CRLF & CRLF & str$(Err) & ": " & Quote & Error$ & Quote Message3 = r & k MsgBox Message3, vbExclamation, "Unexpected Error - " & MyApp$ & ", rev. " & MY_VERSION$ Resume Exit_btnCloseOwnerEditForm_Click
End Sub
There's some other syntax I should be using in place of the DoMenuItem command, right? I believe the syntax show to be old Access 2.0 syntax. What's the preferred syntax for the desired action? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Brandon J. Van Every |
last post by:
What's better about Ruby than Python? I'm sure there's something. What is
it?
This is not a troll. I'm language shopping and I want people's answers. I
don't know beans about Ruby or have...
|
by: John Marshall |
last post by:
How about the following, which I am almost positive
has not been suggested:
-----
class Klass:
def __init__(self, name):
self.name = name
deco meth0:
staticmethod
def meth0(x):
|
by: Dave |
last post by:
I have 2 tables, one with names, and another with addresses, joined by their
CIVICID number (unique to the ADDRESSINFO table) in Oracle.
I need to update a field in the NAMEINFO table for a...
|
by: Deano |
last post by:
I needed to have a listbox populated by locations which are stored in
tblLocations.
However I wanted an "All locations" entry to be at the top of the listbox.
This is not in the tblLocations.
The...
|
by: C# Learner |
last post by:
Why is C syntax so uneasy on the eye?
In its day, was it _really_ designed by snobby programmers to scare away
potential "n00bs"? If so, and after 50+ years of programming research,
why are...
|
by: kosta |
last post by:
hello! one of my forms communicates with a database, and is
supposed to add a row to a table using an Insert
statement... however, I get a 'oledb - syntax error'
exception... I have double...
|
by: Csaba Gabor |
last post by:
I feel like it's the twilight zone here as several seemingly trivial
questions are bugging me.
The first of the following three lines is a syntax error, while the
last one is the only one that...
|
by: Heiko Wundram |
last post by:
Hi all!
The following PEP tries to make the case for a slight unification of for
statement and list comprehension syntax.
Comments appreciated, including on the sample implementation.
===...
|
by: paresh |
last post by:
Is this the valid C statement.
int a,b,c;
c = 5;
<<<
a = b = c;
Can anyone throw the light on this.
-Paresh
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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...
|
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...
|
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: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
| |