Search results

  1. Q

    too few parameters error ?

    bump......
  2. Q

    too few parameters error ?

    Any idea? Seems like a strange error. Is there any alternative way round it :confused:
  3. Q

    too few parameters error ?

    Hi Can't seem to get those to work either :( At the start of the sub I have used the following: MsgBox (Form.Recordsource) This brings up a message box with the correct query it is running everytime I change a drop down and then try to export yet it always falls over on the same line Set rs =...
  4. Q

    too few parameters error ?

    But the drop downs work correctly in conjunction with the same parametised queries. For example, I select an option in the drop down. The query then gets called as the recordsource using the value in the drop down. If that works, then I can't figure out why the recordsource in the code above...
  5. Q

    too few parameters error ?

    I have a form with 2 subforms. There are various dropdowns on the the first subform, which set the recordsource for the form and can be changed continually. The recordource is determined from some queries which have parameters like Forms![TabsReport]!.[Units1].Form.combo_A All the drop downs...
  6. Q

    error when zipping file

    That's partly it but the main error that comes up on the front page is: "The form requires an updateable query". I think this is because when the file is zipped it becomes read-only as any changes can't be made in the zipped folder and compressed directly? If so, there's no way round that is...
  7. Q

    OutputTo method with temporary file

    I have used the DoCmd.OutputTo method successfully when I have specified a filename for the data. This time round I need to actually output the data to a temporary file so that the user can export data as many times as they want and it won't overwrite the data in the existing file (i.e. a new...
  8. Q

    error when zipping file

    That's the problem, it works when unzipped, just not when zipped and opened directly from the zip folder. It opens up as read-only from the zip file, which is what is causing the problems as users need to be able to edit the data. I suppose I could create a self extracting zip file but only...
  9. Q

    error when zipping file

    I have an 18Mb DB, which needs to be zipped up in order to distribute it. I used the standard WIndows zipping function by right clicking on the file and selecting Send to compressed zip folder. All works fine until you open up the DB directly from the ZIP file and none of the references work...
  10. Q

    openargs aren't passed for some reason

    In my form I have a print button, which runs: Private Sub cmd_Print_Click() Dim strReportArgs As String strReportArgs = Forms!TabsReport!Top10_BU.Form.RecordSource MsgBox (strReportArgs) DoCmd.OpenReport "Top10Report", acViewNormal, , , , strReportArgs End Sub This...
  11. Q

    count records in recordsource so I can dynmaically create spreadsheet export

    I'm not retrieving a dataset though, I'm just identifying which query to run for the form. So in my VBA code I might have something like Form.Recordsource = "Query1" From that, I don't think I can work out how many records it has ?
  12. Q

    DB runs slow over network

    Hi I've checked all the tables and there doesn't seem to be a problem with any corruption. ALso to make matters worse, I can't ask the users to compact this DB by themselves as they either do not know how to or will forget. I would therefore need to do this through code somehow, which as far as...
  13. Q

    count records in recordsource so I can dynmaically create spreadsheet export

    Okay, but I thought a recordset was different to a recordsource? Doesn't the recordsource just refer to some SQL rather than actually retireving a dataset ?
  14. Q

    count records in recordsource so I can dynmaically create spreadsheet export

    I am changing the recordsource many times depending on what is chosen from the drop downs. Can I create a separate ecordset at the same time? If so, maybe I could design some sort of function that tells me how many records are in the recordset each time?
  15. Q

    count records in recordsource so I can dynmaically create spreadsheet export

    Hi I need to export a form's data to Excel. I am doing this with the following code: DoCmd.OutputTo acOutputForm, "LegalEntities", acFormatXLS, "C:\A.xls", False I then open up the Excel spreadsheet and enter some formulas and rearrange the data as necessary. This is all done through VBA code...
  16. Q

    pass parameter query ?

    Bit stuck here as to how to pass a parameter to the query: So far, I've got: Private Sub combo_DivLevel_Change() If combo_DivLevel.SelText = "All Divisional Levels" Then Call Populate_DropDowns("", "") ElseIf Len(combo_DivLevel.Text) = 5 Then Dim db As Database 'current database Dim rs As...
  17. Q

    keep default in drop down

    Hi Thanks for the reply. The problem is that as soon as the user makes a choice, the combo won't display the default again. I have got round this in the meantime by adding a union in the select query to populate the combo... (eg) SELECT 'All' FROM TableName UNION SELECT 'ID' FROM TableName
  18. Q

    change subform recordource from another subform

    Is it possible to change a subforms recordsource from another subform? For example, I have a 3 forms: Form1 Form2 Form3 Form2 and Form3 are displayed as subforms on the top level Form1. There are a load of drop downs in Form2 that I need to change a recordsource in Form3. Is this possible and...
  19. Q

    SQL query in code over 100 lines long

    Bit stuck here as to how to pass a parameter to the query: So far, I've got: Private Sub combo_DivLevel_Change() If combo_DivLevel.SelText = "All Divisional Levels" Then Call Populate_DropDowns("", "") ElseIf Len(combo_DivLevel.Text) = 5 Then 'might need a 9 character one as well...
  20. Q

    SQL query in code over 100 lines long

    By querydef do you mean a query that I can add a parameter value to and then through VBA code?
Back
Top Bottom