How do I open a form blank?

Djblois

Registered User.
Local time
Today, 11:15
Joined
Jan 26, 2009
Messages
598
I have a Continuous form of scheduled appointments that may have multiple orders attached each appointment. I have it where they can open a form that will show them all the orders attached to it but if they move down to a blank line on the scheduled appointments then I would like it to show the form blank (don't even give them the option to add a new order) - I want the orders form to be blank. This is the code that I use:

PHP:
Private Sub tgOrders_Click()
    
    On Error GoTo exitOrders
    If tgOrders.Value = True Then
        DoCmd.OpenForm "frmOrders", , , "ord_id = " & Me.tbApptID
    Else
        DoCmd.Close acForm, "frmOrders"
    End If
    Exit Sub
    
exitOrders:
    
    DoCmd.OpenForm "frmOrders"
    Exit Sub
    
End Sub

I want it to open completely blank with no blank lines either. just the headings of the form. How do I do that? I know I would have to test if there are orders attached to this appointment but I have no idea how.
 
when we set the form.AllowAdditions attribute, the form will not allow any new records insert from the FORM.
 
ok this works partially it wont allow additions but it still shows all the orders from the previous record that the user was on. I want it to show up completely blank.
 

Users who are viewing this thread

Back
Top Bottom