Search results

  1. Q

    #Error! is only displayed sometimes on calculated textbox

    Yeah, the controls (textboxes). For example take the following controls: A B C D B, C, and D are hidden but A (visible) cannot be calculated correctly until B,C, and D have finshed retrieveing values from the DB, doing some addition, rounding, etc. As it is a Detail section of a form, the A...
  2. Q

    cannot open multiple Excel documents

    I tried that but same problem. I am now using this but I have to call the Shell command to open 3 separate instances of Excel for each of the export buttons. Isn't there a better way? Call Shell("C:\Program Files\Microsoft Office\Office11\excel.EXE " & "C:\A.xls", 1) Set appExcel =...
  3. Q

    #Error! is only displayed sometimes on calculated textbox

    Yeah, they all have prefixes like cb_ or txt_ etc. The funny thing is is that the textboxes that display #Error don't always display it when I reload the form or refresh them (manually via code). I think it's because the hidden control boxes have not finished calculating by the time these...
  4. Q

    trouble with VBA between Access and Excel

    Sorry, I should have explained that I am setting references to the worksheet: ' Open an existing spreadsheet Set appExcel = GetObject("C:\A.xls") Set workSheet = appExcel.Worksheets("A") ' Show spreadsheet on screen appExcel.Application.Visible = True appExcel.Parent.Windows(1).Visible = True...
  5. Q

    trouble with VBA between Access and Excel

    Hi I am using some VBA from ACcess 2003 to export data to Excel 2003. I then run some tidying up code, which I have created by recording a macro in Excel 2003 and then pasting the code back to Access. Unfortunately stuff like this doesn't work: ActiveCell.FormulaR1C1 = "1"...
  6. Q

    cannot open multiple Excel documents

    I have the following code, which works well individually: Private Sub cmd_Export_Click() DoCmd.OutputTo acOutputForm, "InterestCharge", acFormatXLS, "C:\InterestCharge.xls", False Dim appExcel As Object Dim workBook As Object Dim workSheet As Object ' Open an existing spreadsheet Set...
  7. Q

    #Error! is only displayed sometimes on calculated textbox

    I have a form with loads of calculated textboxes (using expressions). Some of these also rely on other textboxes that are being calculated when the form loads. If I load it once, some of the textboxes display #Error! but most don't. On closing it and reloading it a second time, the textboxes...
  8. Q

    will references work on every computer?

    Possibly but no earlier than Office 2000
  9. Q

    will references work on every computer?

    I have designed some forms and DB in Access 2003. There is plenty of VBA code in there and some of it relies on the: Microsoft Office 11.0 library Microsoft Excel 11.0 object library Is this compiled with this Access DB so that it will work if users have older versions of Access or Excel. And...
  10. Q

    can't edit Excel

    Thanks. Set objXL = GetObject("C:\Form1.xls", "Excel.Application") I tried that and get the error File name or class name not found during Automation operation STarngely enough, if I leave out the Excel.Application it works fine but then it seems to register it as an older version of Excel. So...
  11. Q

    can't edit Excel

    oops. Says ActiveX component can't create object on line: Set objXL = GetObject(, "Excel.Application")
  12. Q

    can't edit Excel

    I'm trying to enter some values in some cells in an Excel spreadsheet as soon as it has been created but the following code doesn't seem to do anything (no errors either). Am I missing a reference: Private Sub cmd_Export_Click() DoCmd.OutputTo acOutputForm, "Form1", acFormatXLS...
  13. Q

    combo box values in Detail section on a form

    Is there anyway way round this at all? For example, using an expression to list multiple values in the combo box instead?
  14. Q

    combo box values in Detail section on a form

    I have a detail section with a textbox and a combobox, e.g. laid out like txt_Name combo_Divisions The data for txt_Name is populated from a query and as this is a continouous form, there can be any number of textboxes on the form. I need to populate the combobox based upon the value of...
  15. Q

    keep default in drop down

    bump .....
  16. Q

    exporting to Excel (format of cells)

    bump .....
  17. Q

    keep default in drop down

    A combo box on my form is filled from some VBA SQL, e.g. combo_DivLevel.RowSource = "SELECT DISTINCT [Div Level] FROM Structure WHERE DivisionID = 3" I also have the default value of the combo set to: "All" The idea is that a user can click on all, to either refresh the combo from the start or...
  18. Q

    exporting to Excel (format of cells)

    I'm using this code to export the Detail section of a form: DoCmd.OutputTo acOutputForm, "Form1", acFormatXLS, "C:\Form1.xls", False Dim objXL As Object On Error Resume Next Set objXL = GetObject(, "Excel.Application") Set objXL = GetObject("C:\Form1.xls")...
  19. Q

    types of drop down

    I need to display a drop down list to users. I know that in a combo box, the user can also type text. However, I want to stop them from doing this and only be able to select values. Is there a better control I could use? I tried the listbox but this does not seem to "drop down" the data like a...
  20. Q

    combo box won't select

    I am using this to populate the combo boxes: Private Sub Form_Load() DoCmd.Maximize combo_DivLevel.RowSource = "SELECT DISTINCT [Div Level] FROM Structure WHERE DivisionID = 3" 'combo_DivLevel.DefaultValue = combo_DivLevel. combo_BusinessLevel.RowSource = "SELECT DISTINCT [Bus Unit Level]...
Back
Top Bottom