473,666 Members | 2,115 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Turn off Name AutoCorrect with VBA?

BradHodge
166 Recognized Expert New Member
I am being stricken with the A2K Name AutoCorrect bug with regards to reports changing margins and orientation. I understand that you can turn this feature off when creating objects, but I am guessing (incorrectly I hope) that this will fix this problem only for my computer.

If this is indeed the case, does anyone know if it's possible to turn autocorrect off as soon as a user opens the database (via a vba module or something)?

Thanks!

Brad.
Apr 16 '07 #1
15 6499
Denburt
1,356 Recognized Expert Top Contributor
The following article explains how you can manually turn it off, if you need to use VBA let us know I am sure I can something to fit your needs.

"Taking the mystery out of Name AutoCorrect in Access."

http://office.microsoft.com/en-us/ac...345661033.aspx
Apr 16 '07 #2
BradHodge
166 Recognized Expert New Member
The following article explains how you can manually turn it off, if you need to use VBA let us know I am sure I can something to fit your needs.

"Taking the mystery out of Name AutoCorrect in Access."

http://office.microsoft.com/en-us/ac...345661033.aspx
_______________ _______________ _______________ _______________ ______
Looks like that link you sent is no longer active (or just a problem with the site).

I have had no problem manually turning off Name AutoCorrect. I just need to know if you manually turn it off before creating Access objects, will this translate to other users PCs using the network version of the database?

If not... I do indeed need some advice on how to use VBA to turn off Name AutoCorrect.

Many thanks!
Apr 17 '07 #3
Denburt
1,356 Recognized Expert Top Contributor
I do believe this is a turned on and off per database type of an item. So if anyone is using that db then it should be set for them as well.

I do indeed need some advice on how to use VBA to turn off Name AutoCorrect.
That may take some effort I will try and do what I can if you or anyone else manages to find it please post it as it could be useful to others. Thanks
Apr 17 '07 #4
BradHodge
166 Recognized Expert New Member
Sweet! That's what I was hoping to hear. I am currently working on the first report I have built from scratch since turning off the AutoCorrect. I'll update you when I try it out.
Apr 17 '07 #5
BradHodge
166 Recognized Expert New Member
Well... Making progress, but...

It is now holding the Margins and the landscape orientation of the page, but it loses the "Legal" page size setting (reverts to Letter).

Thoughts?

Brad.
Apr 17 '07 #6
Denburt
1,356 Recognized Expert Top Contributor
In my module I typed in papersize highlighted it hit F1...Try that for AutoCorrect :)

Help file shows the following:
PaperSize Property
See AlsoApplies ToExampleSpecif icsReturns or sets an AcPrintPaperSiz e constant indicating the paper size to use when printing. Read/write.

AcPrintPaperSiz e can be one of these AcPrintPaperSiz e constants.
acPRPS10x14
acPRPS11x17
acPRPSA3
acPRPSA4
acPRPSA4Small
acPRPSA5
acPRPSB4
acPRPSB5
acPRPSCSheet
acPRPSDSheet
acPRPSEnv10
acPRPSEnv11
acPRPSEnv12
acPRPSEnv14
acPRPSEnv9
acPRPSEnvB4
acPRPSEnvB5
acPRPSEnvB6
acPRPSEnvC3
acPRPSEnvC4
acPRPSEnvC5
acPRPSEnvC6
acPRPSEnvC65
acPRPSEnvDL
acPRPSEnvItaly
acPRPSEnvMonarc h
acPRPSEnvPerson al
acPRPSESheet
acPRPSExecutive
acPRPSFanfoldLg lGerman
acPRPSFanfoldSt dGerman
acPRPSFanfoldUS
acPRPSFolio
acPRPSLedger
acPRPSLegal
acPRPSLetter
acPRPSLetterSma ll
acPRPSNote
acPRPSQuarto
acPRPSStatement
acPRPSTabloid
acPRPSUser

expression.Pape rSize
expression Required. An expression that returns one of the objects in the Applies To list.

Example
The following example sets a variety of printer settings for the form specified in the strFormname argument of the procedure.

Sub SetPrinter(strF ormname As String)

DoCmd.OpenForm FormName:=strFo rmname, view:=acDesign, _
datamode:=acFor mEdit, windowmode:=acH idden

With Forms(form1).Pr inter

.TopMargin = 1440
.BottomMargin = 1440
.LeftMargin = 1440
.RightMargin = 1440

.ColumnSpacing = 360
.RowSpacing = 360

.ColorMode = acPRCMColor
.DataOnly = False
.DefaultSize = False
.ItemSizeHeight = 2880
.ItemSizeWidth = 2880
.ItemLayout = acPRVerticalCol umnLayout
.ItemsAcross = 6

.Copies = 1
.Orientation = acPRORLandscape
.Duplex = acPRDPVertical
.PaperBin = acPRBNAuto
.PaperSize = acPRPSLetter
.PrintQuality = acPRPQMedium

End With

DoCmd.Close objecttype:=acF orm, objectname:=str Formname, _
Save:=acSaveYes


End Sub
Apr 17 '07 #7
BradHodge
166 Recognized Expert New Member
I finally got it working.

As stated before, turning off the Name AutoCorrect made the report hold it's margins and Landscape orientation. However, the Paper Size continued to revert to Letter.

I ended up placing this code in the command button that opened the report...

DoCmd.OpenRepor t "MyReport", acViewPreview
MsgBox ("You must choose Paper Size: 'Legal' to view/print properly")
SendKeys "{RIGHT}"
SendKeys "{TAB}"
SendKeys "{TAB}"
SendKeys "%{DOWN}"
RunCommand acCmdPageSetUp

This opened Page SetUp and opened the dropdown box for choosing the paper size.

Thanks for all of your replies and direction Denburt!

Brad.
Apr 17 '07 #8
Denburt
1,356 Recognized Expert Top Contributor
I am glad you managed to get it working however, I so hate sendkeys... Yes they can get things done but they can be very problematic to say the least. I did a little digging and found the following article and I am sure you will find this useful.

http://support.microsoft.com/kb/290293


The link provides two methods of setting the default printer to legal as well as other properties and I am sure they will produce much more reliable results.
Apr 18 '07 #9
BradHodge
166 Recognized Expert New Member
Indeed this appears that it would be a much better method of accomplishing this task. However, it appears that it will only work on Access 2002, 03 and 07. This database is written in 2k. I have however marked this page for use on my next '03 Db!

Thanks again for your help.

Brad.
Apr 18 '07 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

11
2520
by: RdR | last post by:
Hi, I am using Q Replication, I need to set to logging to capture changes on a table but the table has more than 18 characters for the name, I looked at the docs, it mentioned that table names with more than 18 characters are allowed in DB2 V8 but when you turn on logging, it will not turn on logging. Is there a work around to this? Thanks
4
2454
by: pippo | last post by:
Hello, I searched all over, and couldn't find code to change the Application's autocorrect options through VBA. Is this possible? I'm not talking about the Allow AutoCorrect of txt boxes or cbo boxes, the application. (Tool/Options - General Tab) Thanks Roberto
4
2350
by: Jim M | last post by:
Just got my copy of Access 2003. Is the 'Name Autocorrect' feature in Access 2003 fixed yet, or is it still 'Name Autocorrupt', as many in this newsgroup reported in the past. I would like to finally clean up poor field names I put in my application in 1994 (when I was young and foolish). For example, I used "Date" as a name in eight different tables. I need to fix this. The "Autocorrect" feature sounds like it is designed to make global...
3
2983
by: Regnab | last post by:
I'm not sure if this is some random bug in the system, but I keep getting the #Name? error on one of my forms when I try to link one field to another. For example, I have one field called txtTrialField which = date(). I then have a second field which =. For reasons beyond me, it comes up with the above error. I'm actually trying to make something a little more complicated but after an hour of frustration, I reduced it down to this simple...
2
2479
by: Spawn666948 | last post by:
Hey, do you guys know how to set the Name Autocorrect to unchecked by default. Name Autocorrect is more trouble than its worth. I know I can go to Tools/General, but, I'd rather have it unchecked by default when I create a blank database. Thanks.
1
9919
by: ApexData | last post by:
WatchOut for "Allow AutoCorrect" in your unbound combobox lookups. I am building a personnel database, and the last name of Ballance was causing the following message to popup, prohibiting me from selecting the record: "The text you entered isn't an item in the list" dialog box Went nuts trying to figure out the problem, and then discovered that changing the combobox property "Allow AutoCorrect" as OFF corrected the issue.
0
1210
by: =?Utf-8?B?TG92ZSBCdXp6?= | last post by:
Good day all. I am trying to set up MS Access to replace data in a cell using the AutoCorrect feature in Access. However, when I import a text file (.csv), it doesn't replace the cell as I have set up in AutoCorrect. When I manually type or copy one cell and paste, it works, but not when I import a file. My question: How can I (or can I) set up a table to automatically replace the contents of a cell with what I have in AutoCorrect...
1
4218
by: Simon | last post by:
Dear reader, By default the "Subdatasheet name" of a table is set to . If I change the setting to and save the changes the table property Subdatasheet name is still set to .
6
6767
by: nagar | last post by:
I need to get the list of Autocorrect entries in word. Is there a way to do it without connecting to Word? Is the list saved somewhere? If I need to connect to Word, how can I detect if it's installed on the user machine? Thanks. Andrea
0
8449
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8360
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8876
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8784
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8556
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8642
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6198
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1777
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.