Search results

  1. P

    Using append query after entering new record

    I had added a save record previously which did not fix the issue. But as I started this thread and commented that the TempVar was declared prior to the append I went back and checked only to find out all the TempVar were cleared prior to the append and not redeclared. By doing so the append...
  2. P

    Using append query after entering new record

    The program I am working with has an option to add a new record to another table using a button. Not all the records, even new ones, need to be appended. The append query works fine in all situations but one--when a new record is entered and saved, the append query button returns 0 records to...
  3. P

    using temp variable to append specific number of records to table

    This is where my lack of any formal 'training' in Access limits me. I understand where to insert VBA code in events using the design mode of reports and such, but not when events are not specified. Using the first suggestion of inserting the variable in a string using "dim sqlstr as string"...
  4. P

    using temp variable to append specific number of records to table

    I need to extract a specific number of records into a table using a MakeTable or Append command using a temp variable, e.g. TempK&SA. Previously on the forum I was shown how code could be added to the OnOpen function to use a temp variable to select a specific number of records to report. ACCESS...
  5. P

    Using TempVar variable in SELECT TOP N

    The above sub report continues work well for pulling a specific number of records with a temp variable. But now I need to extract a specific number of records into a table using a MakeTable or Append command using a temp variable, e.g. TempK&SA. ACCESS does not have the OnOpen function in the...
  6. P

    Using TempVar variable in SELECT TOP N

    I may have reversed the name of a query with a report in the OnOpen statement, with that change it appears to be working correctly where if I change the variable NoQuestions in the form, then it updates to a temp variable [TempVars]![TempNoQuestions], then I open the report with your...
  7. P

    Using TempVar variable in SELECT TOP N

    The query works fine and will give back the correct records based on a sort of the multiple variables in the query that are chosen in another form. The number of records to pull has only worked with a parameter (e.g. number or ALL) so far. Variable 'NoQuestions' is assigned as a temp variable...
  8. P

    Using TempVar variable in SELECT TOP N

    The temp variable is defined as [TempVars]![TempNoQuestions] which is what I am attempting to substitute for the parameter '120' in this example, so it is already defined (and errors if redefined in the OnOpen event, that is dim [TempVars]![TempNoQuestions] as integer). Per your recommendation...
  9. P

    Using TempVar variable in SELECT TOP N

    I have read a number of the threads on using a variable in Select statements using VBA code, however I gather my limited knowledge of VBA within a module is catching me off guard in making it work. The report the query is attached to requires a bit of sorting and would be much easier to modify...
Back
Top Bottom