Recent content by mrcost

  1. M

    painfully slow export to excel file.

    I was looking for the same answer. When I use a macro in access to export to excel, it takes forever. When I am in the query datasheet view mode and do File > Export to excel, it is very fast. Any ideas on how to make the macro do the same thing? :cool:
  2. M

    Varying Decimal Places in Report

    Thanks for the tips. I couldn't get it to work, so I was hoping you could help a bit more. I have in the form On Open code: Private Sub Form_Open(Cancel As Integer) Const formattype = "00000000" Dim formatstrg As String formatstrg = "0." & Left(formattype, 4) & "%" End Sub And in the...
  3. M

    Varying Decimal Places in Report

    I have a 2003 Access report that is based on one query. The query has a calculated percentage that I want to display in the report. The user can choose the number of decimal places on a form that they want the percentage to round to in other calculations that are based on that percentage. I...
  4. M

    Varying Text Length

    I tried changing the format in the textbox properties to be $#####0.00, but the ###s dissappeared upon entering. The VBA code in the On Format Event Procedure that I showed above will end up overriding the format in the textbox properties. Putting the extra ###### in the VBA code didn't do...
  5. M

    Varying Text Length

    I tried that with Times New Roman font, which I can't change, and it didn't work. Thanks for the suggestion though. -Mrcost
  6. M

    Varying Text Length

    Hello, I have VBA code that looks at the first line in my report and reformats the text to include a dollar sign. I would now like to make the dollar sign to appear the same distance from the right of the cell, no matter how many digits the number has. I was trying to do a formula to...
  7. M

    Refer to multiple fields in VBA

    Thanks. Maybe you can help with this one. Instead of showing zeros in the report, I put a formula in the detail section for one of fields: =IIf([cost in excess]=0,"-",[cost in excess]) This gives me the desired result, but now that dollar sign VBA code we just did does not format the...
  8. M

    Refer to multiple fields in VBA

    Thanks lagbolt. Cool name. Your code reformats all rows, including text boxes that need to stay as percentages. I changed your code to be as follows: Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) Row_count = CurrentRecord Select Case Row_count...
  9. M

    Refer to multiple fields in VBA

    I am trying to format the first row of my report as currency (see custom format below), and keep the rest as standard. I found the below code to change one field (Est Contract), but does anyone know how can I change all fields on the report at once? If CurrentRecord = 1 Then Me![Est...
  10. M

    Variable Decimal Places in Report

    Thanks a lot. I researched a bit more based on your recommendation and added two columns to the query based on the calculated field as follows: %Text0: Format([% Complete],"0%") %Text2: Format([% Complete],"0.00%") Then I did an IIf statement to select the right one based on the user...
  11. M

    Variable Decimal Places in Report

    I am trying to get the access report to change the number of decimal places based on the user input on a form. The only two choices I want are 0 and 2 decimal places in a percentage taken from a query. I have the query linked to the form to change automatically, but can't get the report to...
Back
Top Bottom