473,397 Members | 2,077 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,397 software developers and data experts.

better syntax in A97 statement

MLH
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?
Jul 1 '06 #1
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?

Jul 1 '06 #2

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

Similar topics

220
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...
41
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):
7
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...
6
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...
177
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...
7
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...
7
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...
6
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. ===...
14
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
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
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...
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
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,...
0
isladogs
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...

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.