Access VBA: How to copy a table

========= QUESTION --------- How do I copy a table using VBA or SQL in Access?   ========= ANSWER --------- See EXAMPLES NOTE: the use of of the square brackets ("[" and "]") will save you a lot of grief! For instance in the example below, the date formatting having hyphens in it screws up the [...]

By |2017-12-01T23:47:49+00:00May 12th, 2011|Access, Computers, Documentation, Microsoft, VBA|Comments Off on Access VBA: How to copy a table

Access: How do I open a new email message from VBA?

========= QUESTION ---------How do I open a new email message from VBA?   ========= ANSWER ---------See EXAMPLES   ========= EXAMPLES ---------Dim olLook As Object 'Start MS OutlookDim olNewEmail As Object 'New email in OutlookDim strContactEmail As String 'Contact email address Set olLook = CreateObject("Outlook.Application")Set olNewEmail = olLook.createitem(0)strEmailSubject = "TopSellers.accdb Application"strEmailText = ""strContactEmail = NAME@DOMAIN With [...]

By |2011-05-05T09:08:36+00:00May 5th, 2011|Access, Computers, Documentation, Microsoft, VBA|Comments Off on Access: How do I open a new email message from VBA?

Access: VBA to open Internet Explorer

========= QUESTION ---------How do I open a web site from VBA? How do I open a url from VBA? How do I use VBA to open Internet Explorer?   ========= ANSWER ---------See Examples   ========= EXAMPLES ---------Private Sub ViewURL_Click() Set browser = CreateObject("InternetExplorer.Application")browser.Navigate ("http://www.Google.com")browser.StatusBar = Falsebrowser.Toolbar = Falsebrowser.Visible = Truebrowser.Resizable = Falsebrowser.AddressBar = True End [...]

By |2011-05-04T10:47:37+00:00May 4th, 2011|Access, Documentation, Microsoft, VBA|Comments Off on Access: VBA to open Internet Explorer

Access: Export report to PDF using VBA

========= QUESTION ---------Using VBA, how do I export a report to PDF in Microsoft Access?   ========= ANSWER ---------Access 2010 option of opening report and outputting to PDF using the Access engine, not Adobe Acrobat Printer: see EXAMPLES --------- Other options: http://www.granite.ab.ca/access/pdffiles.htm   ========= EXAMPLES ---------Private Sub SendReports_Click() Me.CurrentStatus = "Sending Reports..." & vbCrLf & [...]

By |2011-05-04T10:05:40+00:00May 4th, 2011|Access, Computers, Documentation, Microsoft, VBA|Comments Off on Access: Export report to PDF using VBA

Access: Use VBA to copy files

========= QUESTION ---------How do I copy, move, rename files from within the VBA code of my Access project? --------- How do I write a file backup routine into my Microsoft Access project/form?   ========= ANSWER ---------See EXAMPLES   ========= EXAMPLES ---------        DoCmd.Hourglass True    DoCmd.SetWarnings False        'store a serial number in the parms table    'then read [...]

By |2017-12-01T23:47:49+00:00May 4th, 2011|Access, Computers, Documentation, Microsoft, VBA|Comments Off on Access: Use VBA to copy files

Access VBA: How do I delete all records in a table?

========= QUESTION ---------How do I delete all records in a table using VBA?   ========= ANSWER ---------Simply execute a SQL statement as follows: DELETE * FROM NameOfTable;   ========= EXAMPLES ---------Docmd.RunSQL "DELETE * FROM NameOfTable;"   ========= APPLIES TO / KEY WORDS ---------Microsoft Access VBA SQL Clear   ========= REF ---------http://www.access-programmers.co.uk/forums/archive/index.php/t-81194.html     ---http://www.anysitesupport.com/access-vba-how-do-i-delete-all-records-in-a-table/ http://anySiteHosting.com

By |2017-12-01T23:47:50+00:00April 26th, 2011|Access, Computers, Documentation, Microsoft, VBA|Comments Off on Access VBA: How do I delete all records in a table?

Access: Handling Null Values

========= QUESTION ---------Microsoft Access doesn't handle null values very well when doing calculations, etc... Is there a way to check for a null value, and simply flip it to zero, or another entry?   ========= ANSWER ---------Use the NZ() function Nz ( variant, [ value_if_null ] )   ========= EXAMPLES ---------Nz(Data,0) Was: StudentApprovals: IIf([StudentApproves] Is [...]

By |2011-04-25T14:38:12+00:00April 25th, 2011|Access, Computers, Documentation, Microsoft|Comments Off on Access: Handling Null Values

Access: Round Function

========= QUESTION --------- How do I round a number in the Query output in Microsoft Access ========= ANSWER --------- Round(Expression,[Decimal_Places])Expression is the number you wish to roundDecimal_Places is the number of decimals you wish to round to ========= EXAMPLES --------- Round(Goals) Round(Goal,2) Round(153.38,1) = 153.4 ========= APPLIES TO / KEY WORDS --------- Microsoft Access Functions [...]

By |2011-04-25T13:43:49+00:00April 25th, 2011|Access, Computers, Documentation, Microsoft|Comments Off on Access: Round Function

Keyboard Shortcuts: Microsoft Outlook

=========CALENDAR---------[Ctrl]+2: Go to Calendar view from any other view. [Alt]+1-9: View specific number of days, beginning with the selected day. For instance, if April 14 is selected and you press [Alt]+4, Calendar will display April 14 through 17. I use this one often. [Ctrl]+G: Go to a specific date. When you press [Ctrl]+G in Calendar [...]

By |2011-04-19T06:59:57+00:00April 19th, 2011|Computers, Documentation, Microsoft, Outlook|Comments Off on Keyboard Shortcuts: Microsoft Outlook

How do I ping a web site address?

=========QUESTION---------How do I ping a web site address? =========ANSWER---------In Microsoft Windows: Start button, Run, type COMMAND, click [OK]A black window titled Command Prompt should openAt the prompt type the following:PING WEBSITENAME (replace WEBSITENAME with your domain name) --------- In Macintosh OS X: Launch Terminal (open Spotlight by pressing Command + Space bar, and type Terminal)A small [...]

By |2017-12-01T23:47:50+00:00April 12th, 2011|Apple, Computers, Documentation, Internet/Web, Mac, Microsoft, MS-DOS / Batch|Comments Off on How do I ping a web site address?
Go to Top