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

Me.AddMode

TD
Can someone can explain to me what this is - Me.AddMode ? I saw it in
Alison Balter's Mastering Access 2002 Enterprise Development book. She
uses it to determine if a Save button should run an update query or an
append query. I have emailed her for an explanation but so far have
not received a reply. Just hoping someone here has read this book and
might know what it is and how she created it.

Thanks,
TD

Feb 9 '06 #1
4 1697
On 8 Feb 2006 19:05:32 -0800, "TD" <dl**@adsi-sc.com> wrote:

Me refers to the current form (or report).
Me.AddMode most likely refers to a property of that form. Could be a
method, but less likely.
AddMode is not a regular property of a form. Check with the help file
- it's not there. So it was created by the user. You know you can add
properties to a form, right?
Private m_blnAddMode as Boolean
Private Property Get AddMode() As Boolean
AddMode = m_blnAddMode
End Property
Your code can then inspect this property to see what the AddMode value
is:
If Me.AddMode = True Then
'Run append query
else
'Run update query
end if

If you study the examples, you'll find code similar to the above.
There will likely also be a Property Let to set the value of some
internal variable (m_blnAddMode in my example):
If <user_created_new_record>
Me.AddMode = True
End If

-Tom.
Can someone can explain to me what this is - Me.AddMode ? I saw it in
Alison Balter's Mastering Access 2002 Enterprise Development book. She
uses it to determine if a Save button should run an update query or an
append query. I have emailed her for an explanation but so far have
not received a reply. Just hoping someone here has read this book and
might know what it is and how she created it.

Thanks,
TD


Feb 9 '06 #2
TD
Thanks Tom,

Is using a custom property a better way to store this type of
information or is a global variable just as good?

Could you explain the Property Let further?

Thanks again,
TD

Feb 9 '06 #3
On 9 Feb 2006 06:26:23 -0800, "TD" <dl**@adsi-sc.com> wrote:

The properties are better. The rule is: the scope (visibility) of a
variable should be as small as possible. Associating the property with
the form is better than using a global variable which would sloppily
make it available throughout the application.

The help file explains Property Let. Lots of resources online as well,
or an entry-level book about programming.

-Tom.

Thanks Tom,

Is using a custom property a better way to store this type of
information or is a global variable just as good?

Could you explain the Property Let further?

Thanks again,
TD


Feb 10 '06 #4
TD
Thanks for taking the time to answer my questions!

Feb 10 '06 #5

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

Similar topics

0
by: Norman Fritag | last post by:
Hi there, I have one subform in a Master form, which is set to add mode only. I allow only for data entry. Sofar all words fine. All information on the main form is set for display only and have...
1
by: Norman Fritag | last post by:
Hi there, I have one subform in a Master form, which is set to add mode only. I allow only for data entry. Sofar all words fine. All information on the main form is set for display only and have...
2
by: Gummy | last post by:
Hello All, I have a webpage that has two dropdown listboxes. Based on what is selected in these dropdown listboxes, it filters a DataGrid . That works fine. In the DataGrid , when I go to edit...
16
by: wizard04 | last post by:
On my WinXP machine, with both IE6 and Firefox 1.0, response.redirect and server.transfer take about a minute. But on my WinNT machine with IE5.5, it works instantly. What's going on?
3
by: indhu | last post by:
Private Sub cmdsave_Click() If imagebox.Picture = LoadPicture("") Then MsgBox "Please browse the image you want to add to your database.", vbExclamation, "Image required" browseimage ...
4
by: indhu | last post by:
Hi i am getting this kind of error while saving the records this error comes. runtime error: you cannot add or change a record because a related record is required in table scene Private Sub...
24
by: jl2886 | last post by:
I only want the assID to report the highest number if the case number is in the same month and year, otherwise I want it to assign 0. For some reason, my code isn't working. The lsi case number...
0
by: Luqman | last post by:
Which event of Datagrid is fired when i click on a Datagrid New Row. I want to add a LineNo Value to its cell no. 5 ? I tried UserAddedRows Event but its not working ? How can I know, if the...
0
by: zopia | last post by:
<% Dim sMode,intClubID,strClubName,strClubUsername, strClubPwd,intCkType,intCheckType Dim sql_cInsert, sql_EDITClub Dim objConn, strConnection, objRs Set objConn =...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
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...
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
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...

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.