Microsoft Access VBA Macro Programming
MyTable.Fields.Append MyTable.CreateField("IntegerField", dbInteger) MyTable.Fields.Append MyTable.CreateField("SingleNumberFiel ...
Editing Field Properties You can also edit field properties on-the-fly (providing that the table is not open). Here are some exa ...
TDef.Indexes.Append Idx End Sub This code sets up the relevant objects using theDimstatement. Note that you must create a databa ...
Chapter 32 Create an Objects Inventory Chapter 32 Create an Objects Inventory A ccess applications can become extremely complex ...
You can now add the following code into a module: Sub Inventory() Dim Obj As AccessObject, Dbs As Object, RecSet As Recordset Cu ...
Next Obj For Each Obj In CurrentProject.AllMacros RecSet.AddNew RecSet!ObjectName = Obj.Name RecSet!ObjectType = "Macro" RecSet! ...
This page intentionally left blank ...
Chapter 33 Manipulate Chart Colors Chapter 33 Manipulate Chart Colors W hen using charts within your application, you will often ...
Save the table astblCurrency. On your blank form, drag a chart object onto the form. Make your currency table the row source for ...
Using theDimstatement, this code sets up an object for the chart and two variables. The chart object is set to point to the char ...
This page intentionally left blank ...
Chapter 34 Drill Down on Charts Chapter 34 Drill Down on Charts R ecently, I was involved in an Excel application that allowed t ...
You will need to add a reference in to the Chart Object library. In the VBE window, use Tools | References from the menu and sel ...
PCol = GetPixel(Temp, Temp1, Temp2) Set ch = Me.Graph0.Object Pointcount = ch.SeriesCollection( 1 ).Points.Count For n = 1 To Po ...
This page intentionally left blank ...
Chapter 35 Use Excel For Output. Chapter 35 Use Excel For Output. U sing VBA to automate Excel spreadsheets for output of data f ...
Enter the following code into your module: Sub CreateSpreadsheet() Dim RecSet As Recordset Dim MyExcel As Excel.Application Dim ...
This will paste in the single row, but it will also include the column headings. Set the column widths as appropriate, and then ...
Transferring Individual Numbers to Excel The preceding examples are very good for transferring large chunks of data into Excel, ...
On Error Resume Next Kill "TestExcel.xlsx" On Error GoTo 0 MyBook.SaveAs ("TestExcel") MyBook.Close MyExcel.Quit Set RecSet = No ...
«
11
12
13
14
15
16
17
18
19
20
»
Free download pdf