Search results

  1. B

    excel automation

    Thanks for the quick reply. I have already tried using the macro in excel to build the VBA, but it errors out. I tried the following code, but it didn't work. If you have a moment could you provide some more advise. Thanks wtih xlws .range("k3:k5").HorizontalAlignment = xlCenter end with
  2. B

    excel automation

    I am trying to do three things with automation from access. I have been able to change column width, font size etc, but I haven't been able to figure out how to add a border to a group of cells, change the backgroud color, and change the alighnment to center. Everything works on getting the...
  3. B

    Changing Table Definitions

    I am trying to figure out how to automate changing a table definition from number to text with VBA. Lets say, I have a field that is named "Order Number." It always imports as a number because the first few values in the import file are purely numbers. I need to treat it as a text value in my...
  4. B

    Calculated Fields

    I have a form with calculated fields that sometimes result in a #NUM! or #DIV/0!. Is there a formuala that I can put in the control source to cause these errors to provide a "-" value? Something like this: if(tb1 iserror, "-", tb1/tb2) Thanks all Brennan
  5. B

    Combo Box Defaulting to first line

    Works great - the only issue is that I have a second combo that updates based on the first. When I change the lst combo, the second still has a null or zero value in the field displayed in the 2nd combo. How can I get it to display the first record in that field? Thanks
  6. B

    Combo Box Defaulting to first line

    Hello all, Simple question - How do I build a combo box so it defaults to the first real value in the list? Currenly, the default is blank? Thanks Brennan
  7. B

    Importing table/ change field properties

    Willing to learn I am always willing to learn more about VBA. Here is what I am trying to accomplish. I want to change the name of a field in table "Americas Activity" from "Cost Summary Period" to "Accounting Period" There are also several fields in the table that I would like to...
  8. B

    Importing table/ change field properties

    hello all, Right now, I use the macro builder to import a table from a spreadsheet (transfer spreadsheet). The problem is that I do not get to define the field properties for the table that is being imported. In the past, I used the Send Keys function to open the imported table in design...
  9. B

    DSUM - changing criteria values with VBA

    I posted a similar question the other day on the forms forum, but no one responded, so I will try this group. I have a form which displays financial results for our company by month. I use the DSUM function to sort data right out of our General Ledger. Right now this is a sample of the...
  10. B

    Dropping a recordset into Excel

    I am trying to drop a recordset into excel and everything seems to be working but no records are coming through. I am trying to dynamically change one of the fields ((GLData." & FIELD1 & ")='" & crit1 & "') in the where clause and I think that is causing the problem. Could someone take a look...
  11. B

    Aggregating Results by Quarter

    I have a form that aggregates financial results by month and I would like to be able to total the results by quarter as well. Right now, I use a DSUM function with the accountingperiod as a criteria. Accounting Period comes from a value in a combobox. What would the code look like if I added...
  12. B

    Database Speed

    I just put indexes on the fields and it really sped things up. I will also check into the queries vs dsum to see if it speeds things up. Thanks Namliam
  13. B

    Database Speed

    Hello All, I am a somewhat self-taught access user (with lots of help from forums like these). I building my largest database in terms of size and for the first time, I am noticing some speed issues and I would like some suggestions on how to improve the speed at which the db runs. I have...
  14. B

    DSUM VBA and stored variables

    Little additional help Thanks guys for all of your help. I got it to work, but some of my values that pass through cause it to error out. Here is my code: Private Sub update() Dim rank As Integer Dim field As String Dim crit As String rank = Me.Combo6 If rank = "1" Then field = "region"...
  15. B

    DSUM VBA and stored variables

    I am trying to use VBA to change some the criteria in the DSUM function. As you see in the code below, a combobox value changes which field I want to use as a criteria and the value used as the criteria for that field is also in the combobox. These two values are stored as critfield and crit...
Back
Top Bottom