Open form at specific record and define No Additions

RECrerar

Registered User.
Local time
Today, 14:29
Joined
Aug 7, 2008
Messages
130
Hi,

This seems like a deceptively simple thing to have to be asking. I have the following code that opens a form at the record selected in another form. The form opens fine showing the correct record but the user can then scroll to an empty record.

This isn't a huge problem but I assume you can define to open the form with the allow additions property set to false, and as this would be preferable I was hoping someone could tell me how.

Regards
Robyn

Code:
Private Sub Prospect_Name_DblClick(Cancel As Integer)
    On Error GoTo Err_Handler
    Dim strFieldName As String
    Dim strForm As String
    strForm = "frmMainBidData"
    strFieldName = "[ProjectID]=" & Me.ProjectID
DoCmd.OpenForm strForm, , , strFieldName, acFormEdit
Exit_Here:
Exit Sub
Err_Handler:
MsgBox Err.Description & " " & Err.Number
Resume Exit_Here
End Sub
 
and in form controls, other, set cycle to "current record", so the user can't tab off the record.

fir belt and braces, you may also need to disable the mousewheel
 
Hi again,

How do I disable the mouse wheel for just specific forms?

This now also ties in with another form I have that has a combo box in the header that is used to navigate to a specific record. I would like this to be the only way to navigate to a record on the form

Regards
Robyn
 

Users who are viewing this thread

Back
Top Bottom