First Blank to appear!

B

Bob

--
When I click on say "Payments" I always get the first or number 1 payment
show from [Forms] , How can I get the first Blank Form to show??


Thanks in advance.........Bob Vance
 
J

John Vinson

When I click on say "Payments" I always get the first or number 1 payment
show from [Forms] , How can I get the first Blank Form to show??

Two ways. 1: set the Data Entry property of the Form to True. This
will ONLY let you enter new records, not review or edit old ones.
2. Put the following code in the Form's Open event (click the ... icon
and select Code Builder):

Private Sub Form_Open(Cancel as Integer)
DoCmd.GoToRecord acForm, Me.Name, acNewRecord
End Sub

John W. Vinson[MVP]
 
B

Bob

Open Event how do I get to that please and Code Builder, sorry newbie!

John Vinson said:
When I click on say "Payments" I always get the first or number 1 payment
show from [Forms] , How can I get the first Blank Form to show??

Two ways. 1: set the Data Entry property of the Form to True. This
will ONLY let you enter new records, not review or edit old ones.
2. Put the following code in the Form's Open event (click the ... icon
and select Code Builder):

Private Sub Form_Open(Cancel as Integer)
DoCmd.GoToRecord acForm, Me.Name, acNewRecord
End Sub

John W. Vinson[MVP]
 
B

Bob

Run Time error '2150'
You cant go to the specific record.
Found what to do and got this error! thanks bob

Bob said:
Open Event how do I get to that please and Code Builder, sorry newbie!

John Vinson said:
When I click on say "Payments" I always get the first or number 1 payment
show from [Forms] , How can I get the first Blank Form to show??

Two ways. 1: set the Data Entry property of the Form to True. This
will ONLY let you enter new records, not review or edit old ones.
2. Put the following code in the Form's Open event (click the ... icon
and select Code Builder):

Private Sub Form_Open(Cancel as Integer)
DoCmd.GoToRecord acForm, Me.Name, acNewRecord
End Sub

John W. Vinson[MVP]
 
B

Bob

Option Compare Database

Private Sub cbOwnerID_GotFocus()
cbOwnerID.Requery
End Sub

Private Sub cmdClose_Click()
DoCmd.Close acForm, "frmAccountStatus"
End Sub

Private Sub cmdDate_Click()
DoCmd.Close acForm, "frmCalender"
Dim dtdate As Date
dtdate = Format(Now(), "dd/mm/yyyy")
iccCalender (dtdate)
If Len(Forms!frmCalender![tbDate]) = 0 Then
Exit Sub
Else
tbBillDate.value = Format(Forms!frmCalender![tbDate], "dd-mmm-yy")
End If

End Sub

Private Sub Form_Load()
DoCmd.Maximize
End Sub

Private Sub Form_Open(Cancel As Integer)
DoCmd.GoToRecord acForm, Me.Name, acNewRecord----> yellow line
End Sub


Bob said:
Run Time error '2150'
You cant go to the specific record.
Found what to do and got this error! thanks bob

Bob said:
Open Event how do I get to that please and Code Builder, sorry newbie!

John Vinson said:
When I click on say "Payments" I always get the first or number 1
payment
show from [Forms] , How can I get the first Blank Form to show??

Two ways. 1: set the Data Entry property of the Form to True. This
will ONLY let you enter new records, not review or edit old ones.
2. Put the following code in the Form's Open event (click the ... icon
and select Code Builder):

Private Sub Form_Open(Cancel as Integer)
DoCmd.GoToRecord acForm, Me.Name, acNewRecord
End Sub

John W. Vinson[MVP]
 
P

PC Datasheet

Click on the far right navigation button (one with an asterisk) at the
bottom left of the screen. This will take you to a new record.
 
J

John Vinson

Private Sub Form_Open(Cancel As Integer)
DoCmd.GoToRecord acForm, Me.Name, acNewRecord----> yellow line
End Sub

Sorry, my typos:

docmd.GoToRecord acDataForm,me.Name,acNewRec


John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top