Recent content by JeffreyDavid

  1. J

    Parameter Query question

    Thank You for all your advise gentlemen, it now works. This made it work: Add 2 unbound controls to your main form and make them non-visible. Set up your queries to reference these 2 form controls as start and end date criteria instead a parameter entry. Then in the On Open event of your form...
  2. J

    Parameter Query question

    RichO, I am trying to set up my queries to reference the 2 controls StartDate and EndDate, instead of a parameter query, but am having problems. The code I put in the criteria is: Between [Forms]![Management STATS]![txtUnbound1] And [Forms]![Management STATS]![txtUnbound2] But the subforms are...
  3. J

    Parameter Query question

    I have a form with 3 subforms. Each subform has it own parameter query and all parameter queries are the same, copied and pasted. If I open the main form now, it asks me 3 times to input the start date and ending date. I don't want my users to have to type the starting date and ending date in...
  4. J

    Use 1 parameter Query for 3 subforms

    :confused: I have a form with 3 subforms. Each subform needs to use the same data entered in the parameter query, but I don't want my users to have to type it in 3 times each time the form is opened. If I set the parameter query to the main form, the subforms don't recognize the parameter...
  5. J

    How to stop subform from creating a blank line

    There is nothing in the FormOpen event of the subform. My subform does have 3 cascading text boxes. In the BeforeUpdate event, I have If IsNull(Me.ProjectNo) = "" Then Cancel = True End If But when I close the form with nothing done to anything, I get an error saying 'Type Mismatch' and...
  6. J

    How to stop subform from creating a blank line

    I have a form with a subform, if the form is opened and closed with no data input, it creates a blank line in the table. Over an extended period of time, that table will be mess. How would one go about stopping a subform from creating a blank line in the table?
  7. J

    Print Preview button on form

    :confused: I have a form with a print report button at the bottom. My code is: On Error GoTo Err_PrintInvoice_Click Dim strDocName As String strDocName = "NcrPrintOut" ' Print NCR report, using NcrPrintOut Filter query to print ' invoice for current order...
  8. J

    Pull next project number each time the form is opened

    Thanks for everyones help. I ended up putting as hidden text box on the form with the code: = DMax("[txtProjectNo]", "Orders") Then in the OnOpen event of the form put , Me.txtProjectNo = Me.HiddenTextBox + 1 And All is well.
  9. J

    How to delete an entire line from a table using a delete query

    :confused: I have a form and subform, if the form is opened and closed without doing anything, it creates a blank line in the table. Given enough time, that table will be a mess. I want to create a delete query based on, If Product is Null If Model is Null If Description is Null If Type is...
  10. J

    Pull next project number each time the form is opened

    I keep getting that error message, invalid use of null. I have this code in the OnOpen event of the main form. So when I open the main form it goes to the 'Orders' table, looks at the 'ProjectNo', determines the highest number, adds 1 to it and puts it in the 'txtProjectNo'. If it can't find...
  11. J

    Pull next project number each time the form is opened

    Wayne, I'm not sure if I have the syntax correct, here is my code, my ProjectNo is a 4 digit number which resides in the Orders table and the control on my form is txtProjectNo. Dim Ords As Long Ords = DMax("txtProjectNo", "Orders", "[ProjectNo] + 1") I get an error message saying that invalid...
  12. J

    Pull next project number each time the form is opened

    :mad: I have a form (ProposedProject) with a subform and each time I open the form, it checks the Orders table, finds the last project number and adds 1 and that is my new project number. Heres the code I used. Dim db As Database Dim rs As Recordset Set db = CurrentDb Set rs =...
  13. J

    Tab out of a subform

    :confused: I have a form with a subform, with text boxes above and below. I navigate through my form using the tab button. So I tab through the text boxes above the subform, no problem, tab into and through the subform, no problem. But to get out of the subform, I need to click the next text...
  14. J

    To have combo box blank when form opens?

    :confused: I have a form, a combo box and some text boxes. When I click on the combo box, it shows multiple fields in the table and when I select one, it populates the combo box and the appropriate text boxes. For some reason, when I open the form, the combo box displays a name from the...
  15. J

    New record line in subform to repeat field from previous line

    I have a form and subform and when the form opens, the subform copies the project number from the form. But when there is a second line in the subform, it doesn't repeat the project number. I have put the [Form]![MainForm]![ProjectNo] as the default value, and that didn't work. I also put into...
Back
Top Bottom