prepare form for new record entry on open

G

Guest

Hi,
I hope that someone can help me out with a problem I have encountered with
my Access database which holds details of clinical studies. I have a start-up
form which has a combo box where you can click on the primary key, StudyRefNo
and this will take you to the ‘study details’ form and show you the record
that you had just selected in the combo box. To enable this, I used the code:

Private Sub Combo25_AfterUpdate()
DoCmd.OpenForm "Study details1", WhereCondition:="StudyRefNo=FORMS![Start up
form]!Combo25"

End Sub

However, I also have on the start-up form a command button to open the form
‘Study details1’. I wanted the study details form to open here blank, so I
can add a new record, but I had to remove the coding:

RunCommand acCmdRecordsGoToNew

to enable this new recordset, in order to enable the coding above to run for
the combo box. Instead, now, on open it shows the first record already
stored.

So I’d like to have my combo box still working as it is but for my command
button to open the study details form to allow a new record to be entered.

I’d be very grateful if someone could help me out (in step by step simple
instructions if possible, as I need this!!)
Thanks,
Liz.
 
G

Guest

Simple, use the DataMode argument of the OpenForm method:
to open the form in edit mode:

DoCmd.OpenForm "Study details1", _
WhereCondition:="StudyRefNo=FORMS![Start up form]!Combo25", _
DataMode:= acEdit

to open the form for adding:
DoCmd.OpenForm "Study details1", DataMode:= acAdd
 
G

Guest

Hi,
Many thanks for replying to my problem. I haven't had much experience in
working with the actual coding so I hope you don't mind me replying to you
for more help - I hope you can stay with me as I'd be so happy to fix my
problem.
Would it be possible to tell me exactly what to click on - I've never used
the 'datamode argument' I don't think. Where do I copy the coding you have
given to me. I wasn't joking when I said step-by-step instructions!! Please
bear with me. Look forward to hearing from you again.
Thanks,
Liz.

Klatuu said:
Simple, use the DataMode argument of the OpenForm method:
to open the form in edit mode:

DoCmd.OpenForm "Study details1", _
WhereCondition:="StudyRefNo=FORMS![Start up form]!Combo25", _
DataMode:= acEdit

to open the form for adding:
DoCmd.OpenForm "Study details1", DataMode:= acAdd


Liverlass3981 said:
Hi,
I hope that someone can help me out with a problem I have encountered with
my Access database which holds details of clinical studies. I have a start-up
form which has a combo box where you can click on the primary key, StudyRefNo
and this will take you to the ‘study details’ form and show you the record
that you had just selected in the combo box. To enable this, I used the code:

Private Sub Combo25_AfterUpdate()
DoCmd.OpenForm "Study details1", WhereCondition:="StudyRefNo=FORMS![Start up
form]!Combo25"

End Sub

However, I also have on the start-up form a command button to open the form
‘Study details1’. I wanted the study details form to open here blank, so I
can add a new record, but I had to remove the coding:

RunCommand acCmdRecordsGoToNew

to enable this new recordset, in order to enable the coding above to run for
the combo box. Instead, now, on open it shows the first record already
stored.

So I’d like to have my combo box still working as it is but for my command
button to open the study details form to allow a new record to be entered.

I’d be very grateful if someone could help me out (in step by step simple
instructions if possible, as I need this!!)
Thanks,
Liz.
 
G

Guest

No problem, Liz. Let's start with opening the form to add a record:
Open your form in Design view
Right Click on the Command Button you use to open the Study details1 form
Select Properties - You will get a dialog box
Select the Events Tab
Click in the empty box next to On Click:
On the right you will see a small command button with dots [...]
Click on that button
Select Code Builder
The VBA Editor will open with the sub for the Click Event created.
Paste this line in:
DoCmd.OpenForm "Study details1", DataMode:= acAdd

Now for where you open it for editing. You posted the code as to where that
happens. Just modify it as below:
Private Sub Combo25_AfterUpdate()
DoCmd.OpenForm "Study details1", _
WhereCondition:="StudyRefNo=FORMS![Start up form]!Combo25", _
DataMode:= acEdit
End Sub

If you need to know how to get to it, follow the steps above except that you
right click on your combo box and select After Update instead of On Click

Post back if you need more help.

Liverlass3981 said:
Hi,
Many thanks for replying to my problem. I haven't had much experience in
working with the actual coding so I hope you don't mind me replying to you
for more help - I hope you can stay with me as I'd be so happy to fix my
problem.
Would it be possible to tell me exactly what to click on - I've never used
the 'datamode argument' I don't think. Where do I copy the coding you have
given to me. I wasn't joking when I said step-by-step instructions!! Please
bear with me. Look forward to hearing from you again.
Thanks,
Liz.

Klatuu said:
Simple, use the DataMode argument of the OpenForm method:
to open the form in edit mode:

DoCmd.OpenForm "Study details1", _
WhereCondition:="StudyRefNo=FORMS![Start up form]!Combo25", _
DataMode:= acEdit

to open the form for adding:
DoCmd.OpenForm "Study details1", DataMode:= acAdd


Liverlass3981 said:
Hi,
I hope that someone can help me out with a problem I have encountered with
my Access database which holds details of clinical studies. I have a start-up
form which has a combo box where you can click on the primary key, StudyRefNo
and this will take you to the ‘study details’ form and show you the record
that you had just selected in the combo box. To enable this, I used the code:

Private Sub Combo25_AfterUpdate()
DoCmd.OpenForm "Study details1", WhereCondition:="StudyRefNo=FORMS![Start up
form]!Combo25"

End Sub

However, I also have on the start-up form a command button to open the form
‘Study details1’. I wanted the study details form to open here blank, so I
can add a new record, but I had to remove the coding:

RunCommand acCmdRecordsGoToNew

to enable this new recordset, in order to enable the coding above to run for
the combo box. Instead, now, on open it shows the first record already
stored.

So I’d like to have my combo box still working as it is but for my command
button to open the study details form to allow a new record to be entered.

I’d be very grateful if someone could help me out (in step by step simple
instructions if possible, as I need this!!)
Thanks,
Liz.
 
G

Guest

Hi there,

Many thanks for your response – much appreciated. I started to do what you
said, right click on properties on the command button to open the study
details form and I clicked on the Events tab and found the On-click. However,
when I clicked on the dots, it took me straight to the VBA window instead of
giving me a choice to select Code builder. It took me to the VBA window to
the following code:
Private Sub openstudydetsup_Click()
On Error GoTo Err_openstudydetsup_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Study details1"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_openstudydetsup_Click:
Exit Sub

Err_openstudydetsup_Click:
MsgBox Err.Description
Resume Exit_openstudydetsup_Click

End Sub

I’m wondering if this coding needs to be deleted in order to put in the
coding that you gave to me to paste in, or whether it needs to be
incorporated into the coding?

Hope that makes sense.

Look forward to hearing from you.
Thanks,
Liz.

Klatuu said:
No problem, Liz. Let's start with opening the form to add a record:
Open your form in Design view
Right Click on the Command Button you use to open the Study details1 form
Select Properties - You will get a dialog box
Select the Events Tab
Click in the empty box next to On Click:
On the right you will see a small command button with dots [...]
Click on that button
Select Code Builder
The VBA Editor will open with the sub for the Click Event created.
Paste this line in:
DoCmd.OpenForm "Study details1", DataMode:= acAdd

Now for where you open it for editing. You posted the code as to where that
happens. Just modify it as below:
Private Sub Combo25_AfterUpdate()
DoCmd.OpenForm "Study details1", _
WhereCondition:="StudyRefNo=FORMS![Start up form]!Combo25", _
DataMode:= acEdit
End Sub

If you need to know how to get to it, follow the steps above except that you
right click on your combo box and select After Update instead of On Click

Post back if you need more help.

Liverlass3981 said:
Hi,
Many thanks for replying to my problem. I haven't had much experience in
working with the actual coding so I hope you don't mind me replying to you
for more help - I hope you can stay with me as I'd be so happy to fix my
problem.
Would it be possible to tell me exactly what to click on - I've never used
the 'datamode argument' I don't think. Where do I copy the coding you have
given to me. I wasn't joking when I said step-by-step instructions!! Please
bear with me. Look forward to hearing from you again.
Thanks,
Liz.

Klatuu said:
Simple, use the DataMode argument of the OpenForm method:
to open the form in edit mode:

DoCmd.OpenForm "Study details1", _
WhereCondition:="StudyRefNo=FORMS![Start up form]!Combo25", _
DataMode:= acEdit

to open the form for adding:
DoCmd.OpenForm "Study details1", DataMode:= acAdd


:

Hi,
I hope that someone can help me out with a problem I have encountered with
my Access database which holds details of clinical studies. I have a start-up
form which has a combo box where you can click on the primary key, StudyRefNo
and this will take you to the ‘study details’ form and show you the record
that you had just selected in the combo box. To enable this, I used the code:

Private Sub Combo25_AfterUpdate()
DoCmd.OpenForm "Study details1", WhereCondition:="StudyRefNo=FORMS![Start up
form]!Combo25"

End Sub

However, I also have on the start-up form a command button to open the form
‘Study details1’. I wanted the study details form to open here blank, so I
can add a new record, but I had to remove the coding:

RunCommand acCmdRecordsGoToNew

to enable this new recordset, in order to enable the coding above to run for
the combo box. Instead, now, on open it shows the first record already
stored.

So I’d like to have my combo box still working as it is but for my command
button to open the study details form to allow a new record to be entered.

I’d be very grateful if someone could help me out (in step by step simple
instructions if possible, as I need this!!)
Thanks,
Liz.
 
G

Guest

Hi Klattu,

Just wondering if you were still there to help me finish fixing my problem?
I'd be so happy if you could see me through this, as I'd like to be able to
do this design on future databases too.
Hope you can get back to me!
Regards,
Liz.

Liverlass3981 said:
Hi there,

Many thanks for your response – much appreciated. I started to do what you
said, right click on properties on the command button to open the study
details form and I clicked on the Events tab and found the On-click. However,
when I clicked on the dots, it took me straight to the VBA window instead of
giving me a choice to select Code builder. It took me to the VBA window to
the following code:
Private Sub openstudydetsup_Click()
On Error GoTo Err_openstudydetsup_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Study details1"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_openstudydetsup_Click:
Exit Sub

Err_openstudydetsup_Click:
MsgBox Err.Description
Resume Exit_openstudydetsup_Click

End Sub

I’m wondering if this coding needs to be deleted in order to put in the
coding that you gave to me to paste in, or whether it needs to be
incorporated into the coding?

Hope that makes sense.

Look forward to hearing from you.
Thanks,
Liz.

Klatuu said:
No problem, Liz. Let's start with opening the form to add a record:
Open your form in Design view
Right Click on the Command Button you use to open the Study details1 form
Select Properties - You will get a dialog box
Select the Events Tab
Click in the empty box next to On Click:
On the right you will see a small command button with dots [...]
Click on that button
Select Code Builder
The VBA Editor will open with the sub for the Click Event created.
Paste this line in:
DoCmd.OpenForm "Study details1", DataMode:= acAdd

Now for where you open it for editing. You posted the code as to where that
happens. Just modify it as below:
Private Sub Combo25_AfterUpdate()
DoCmd.OpenForm "Study details1", _
WhereCondition:="StudyRefNo=FORMS![Start up form]!Combo25", _
DataMode:= acEdit
End Sub

If you need to know how to get to it, follow the steps above except that you
right click on your combo box and select After Update instead of On Click

Post back if you need more help.

Liverlass3981 said:
Hi,
Many thanks for replying to my problem. I haven't had much experience in
working with the actual coding so I hope you don't mind me replying to you
for more help - I hope you can stay with me as I'd be so happy to fix my
problem.
Would it be possible to tell me exactly what to click on - I've never used
the 'datamode argument' I don't think. Where do I copy the coding you have
given to me. I wasn't joking when I said step-by-step instructions!! Please
bear with me. Look forward to hearing from you again.
Thanks,
Liz.

:

Simple, use the DataMode argument of the OpenForm method:
to open the form in edit mode:

DoCmd.OpenForm "Study details1", _
WhereCondition:="StudyRefNo=FORMS![Start up form]!Combo25", _
DataMode:= acEdit

to open the form for adding:
DoCmd.OpenForm "Study details1", DataMode:= acAdd


:

Hi,
I hope that someone can help me out with a problem I have encountered with
my Access database which holds details of clinical studies. I have a start-up
form which has a combo box where you can click on the primary key, StudyRefNo
and this will take you to the ‘study details’ form and show you the record
that you had just selected in the combo box. To enable this, I used the code:

Private Sub Combo25_AfterUpdate()
DoCmd.OpenForm "Study details1", WhereCondition:="StudyRefNo=FORMS![Start up
form]!Combo25"

End Sub

However, I also have on the start-up form a command button to open the form
‘Study details1’. I wanted the study details form to open here blank, so I
can add a new record, but I had to remove the coding:

RunCommand acCmdRecordsGoToNew

to enable this new recordset, in order to enable the coding above to run for
the combo box. Instead, now, on open it shows the first record already
stored.

So I’d like to have my combo box still working as it is but for my command
button to open the study details form to allow a new record to be entered.

I’d be very grateful if someone could help me out (in step by step simple
instructions if possible, as I need this!!)
Thanks,
Liz.
 
G

Guest

Sorry to be sdo long getting back. I have been off for the last week and not
able to respond. Bring me uip to date on where we are so we can get this
done.

Liverlass3981 said:
Hi Klattu,

Just wondering if you were still there to help me finish fixing my problem?
I'd be so happy if you could see me through this, as I'd like to be able to
do this design on future databases too.
Hope you can get back to me!
Regards,
Liz.

Liverlass3981 said:
Hi there,

Many thanks for your response – much appreciated. I started to do what you
said, right click on properties on the command button to open the study
details form and I clicked on the Events tab and found the On-click. However,
when I clicked on the dots, it took me straight to the VBA window instead of
giving me a choice to select Code builder. It took me to the VBA window to
the following code:
Private Sub openstudydetsup_Click()
On Error GoTo Err_openstudydetsup_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Study details1"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_openstudydetsup_Click:
Exit Sub

Err_openstudydetsup_Click:
MsgBox Err.Description
Resume Exit_openstudydetsup_Click

End Sub

I’m wondering if this coding needs to be deleted in order to put in the
coding that you gave to me to paste in, or whether it needs to be
incorporated into the coding?

Hope that makes sense.

Look forward to hearing from you.
Thanks,
Liz.

Klatuu said:
No problem, Liz. Let's start with opening the form to add a record:
Open your form in Design view
Right Click on the Command Button you use to open the Study details1 form
Select Properties - You will get a dialog box
Select the Events Tab
Click in the empty box next to On Click:
On the right you will see a small command button with dots [...]
Click on that button
Select Code Builder
The VBA Editor will open with the sub for the Click Event created.
Paste this line in:
DoCmd.OpenForm "Study details1", DataMode:= acAdd

Now for where you open it for editing. You posted the code as to where that
happens. Just modify it as below:
Private Sub Combo25_AfterUpdate()
DoCmd.OpenForm "Study details1", _
WhereCondition:="StudyRefNo=FORMS![Start up form]!Combo25", _
DataMode:= acEdit
End Sub

If you need to know how to get to it, follow the steps above except that you
right click on your combo box and select After Update instead of On Click

Post back if you need more help.

:

Hi,
Many thanks for replying to my problem. I haven't had much experience in
working with the actual coding so I hope you don't mind me replying to you
for more help - I hope you can stay with me as I'd be so happy to fix my
problem.
Would it be possible to tell me exactly what to click on - I've never used
the 'datamode argument' I don't think. Where do I copy the coding you have
given to me. I wasn't joking when I said step-by-step instructions!! Please
bear with me. Look forward to hearing from you again.
Thanks,
Liz.

:

Simple, use the DataMode argument of the OpenForm method:
to open the form in edit mode:

DoCmd.OpenForm "Study details1", _
WhereCondition:="StudyRefNo=FORMS![Start up form]!Combo25", _
DataMode:= acEdit

to open the form for adding:
DoCmd.OpenForm "Study details1", DataMode:= acAdd


:

Hi,
I hope that someone can help me out with a problem I have encountered with
my Access database which holds details of clinical studies. I have a start-up
form which has a combo box where you can click on the primary key, StudyRefNo
and this will take you to the ‘study details’ form and show you the record
that you had just selected in the combo box. To enable this, I used the code:

Private Sub Combo25_AfterUpdate()
DoCmd.OpenForm "Study details1", WhereCondition:="StudyRefNo=FORMS![Start up
form]!Combo25"

End Sub

However, I also have on the start-up form a command button to open the form
‘Study details1’. I wanted the study details form to open here blank, so I
can add a new record, but I had to remove the coding:

RunCommand acCmdRecordsGoToNew

to enable this new recordset, in order to enable the coding above to run for
the combo box. Instead, now, on open it shows the first record already
stored.

So I’d like to have my combo box still working as it is but for my command
button to open the study details form to allow a new record to be entered.

I’d be very grateful if someone could help me out (in step by step simple
instructions if possible, as I need this!!)
Thanks,
Liz.
 
G

Guest

Hi Klatuu,
Good to hear from you again - thanks.

I started to do what you said, right click on properties on the command
button to open the study
details form and I clicked on the Events tab and found the On-click. However,
when I clicked on the dots, it took me straight to the VBA window instead of
giving me a choice to select Code builder. It took me to the VBA window to
the following code:
Private Sub openstudydetsup_Click()
On Error GoTo Err_openstudydetsup_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Study details1"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_openstudydetsup_Click:
Exit Sub

Err_openstudydetsup_Click:
MsgBox Err.Description
Resume Exit_openstudydetsup_Click

End Sub

I’m wondering if this coding needs to be deleted in order to put in the
coding that you gave to me to paste in, or whether it needs to be
incorporated into the coding?

Hope that makes sense.

Look forward to hearing from you.
Thanks,
Liz.



Klatuu said:
Sorry to be sdo long getting back. I have been off for the last week and not
able to respond. Bring me uip to date on where we are so we can get this
done.

Liverlass3981 said:
Hi Klattu,

Just wondering if you were still there to help me finish fixing my problem?
I'd be so happy if you could see me through this, as I'd like to be able to
do this design on future databases too.
Hope you can get back to me!
Regards,
Liz.

Liverlass3981 said:
Hi there,

Many thanks for your response – much appreciated. I started to do what you
said, right click on properties on the command button to open the study
details form and I clicked on the Events tab and found the On-click. However,
when I clicked on the dots, it took me straight to the VBA window instead of
giving me a choice to select Code builder. It took me to the VBA window to
the following code:
Private Sub openstudydetsup_Click()
On Error GoTo Err_openstudydetsup_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Study details1"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_openstudydetsup_Click:
Exit Sub

Err_openstudydetsup_Click:
MsgBox Err.Description
Resume Exit_openstudydetsup_Click

End Sub

I’m wondering if this coding needs to be deleted in order to put in the
coding that you gave to me to paste in, or whether it needs to be
incorporated into the coding?

Hope that makes sense.

Look forward to hearing from you.
Thanks,
Liz.

:

No problem, Liz. Let's start with opening the form to add a record:
Open your form in Design view
Right Click on the Command Button you use to open the Study details1 form
Select Properties - You will get a dialog box
Select the Events Tab
Click in the empty box next to On Click:
On the right you will see a small command button with dots [...]
Click on that button
Select Code Builder
The VBA Editor will open with the sub for the Click Event created.
Paste this line in:
DoCmd.OpenForm "Study details1", DataMode:= acAdd

Now for where you open it for editing. You posted the code as to where that
happens. Just modify it as below:
Private Sub Combo25_AfterUpdate()
DoCmd.OpenForm "Study details1", _
WhereCondition:="StudyRefNo=FORMS![Start up form]!Combo25", _
DataMode:= acEdit
End Sub

If you need to know how to get to it, follow the steps above except that you
right click on your combo box and select After Update instead of On Click

Post back if you need more help.

:

Hi,
Many thanks for replying to my problem. I haven't had much experience in
working with the actual coding so I hope you don't mind me replying to you
for more help - I hope you can stay with me as I'd be so happy to fix my
problem.
Would it be possible to tell me exactly what to click on - I've never used
the 'datamode argument' I don't think. Where do I copy the coding you have
given to me. I wasn't joking when I said step-by-step instructions!! Please
bear with me. Look forward to hearing from you again.
Thanks,
Liz.

:

Simple, use the DataMode argument of the OpenForm method:
to open the form in edit mode:

DoCmd.OpenForm "Study details1", _
WhereCondition:="StudyRefNo=FORMS![Start up form]!Combo25", _
DataMode:= acEdit

to open the form for adding:
DoCmd.OpenForm "Study details1", DataMode:= acAdd


:

Hi,
I hope that someone can help me out with a problem I have encountered with
my Access database which holds details of clinical studies. I have a start-up
form which has a combo box where you can click on the primary key, StudyRefNo
and this will take you to the ‘study details’ form and show you the record
that you had just selected in the combo box. To enable this, I used the code:

Private Sub Combo25_AfterUpdate()
DoCmd.OpenForm "Study details1", WhereCondition:="StudyRefNo=FORMS![Start up
form]!Combo25"

End Sub

However, I also have on the start-up form a command button to open the form
‘Study details1’. I wanted the study details form to open here blank, so I
can add a new record, but I had to remove the coding:

RunCommand acCmdRecordsGoToNew

to enable this new recordset, in order to enable the coding above to run for
the combo box. Instead, now, on open it shows the first record already
stored.

So I’d like to have my combo box still working as it is but for my command
button to open the study details form to allow a new record to be entered.

I’d be very grateful if someone could help me out (in step by step simple
instructions if possible, as I need this!!)
Thanks,
Liz.
 
G

Guest

It went straight to the code because there is existing code. That is no
problem.
For this part of the exercise, see below where I changed one line of code

Liverlass3981 said:
Hi Klatuu,
Good to hear from you again - thanks.

I started to do what you said, right click on properties on the command
button to open the study
details form and I clicked on the Events tab and found the On-click. However,
when I clicked on the dots, it took me straight to the VBA window instead of
giving me a choice to select Code builder. It took me to the VBA window to
the following code:
Private Sub openstudydetsup_Click()
On Error GoTo Err_openstudydetsup_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Study details1"
DoCmd.OpenForm "Study details1", DataMode:= acAdd

Exit_openstudydetsup_Click:
Exit Sub

Err_openstudydetsup_Click:
MsgBox Err.Description
Resume Exit_openstudydetsup_Click

End Sub

I’m wondering if this coding needs to be deleted in order to put in the
coding that you gave to me to paste in, or whether it needs to be
incorporated into the coding?

Hope that makes sense.

Look forward to hearing from you.
Thanks,
Liz.



Klatuu said:
Sorry to be sdo long getting back. I have been off for the last week and not
able to respond. Bring me uip to date on where we are so we can get this
done.

Liverlass3981 said:
Hi Klattu,

Just wondering if you were still there to help me finish fixing my problem?
I'd be so happy if you could see me through this, as I'd like to be able to
do this design on future databases too.
Hope you can get back to me!
Regards,
Liz.

:


Hi there,

Many thanks for your response – much appreciated. I started to do what you
said, right click on properties on the command button to open the study
details form and I clicked on the Events tab and found the On-click. However,
when I clicked on the dots, it took me straight to the VBA window instead of
giving me a choice to select Code builder. It took me to the VBA window to
the following code:
Private Sub openstudydetsup_Click()
On Error GoTo Err_openstudydetsup_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Study details1"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_openstudydetsup_Click:
Exit Sub

Err_openstudydetsup_Click:
MsgBox Err.Description
Resume Exit_openstudydetsup_Click

End Sub

I’m wondering if this coding needs to be deleted in order to put in the
coding that you gave to me to paste in, or whether it needs to be
incorporated into the coding?

Hope that makes sense.

Look forward to hearing from you.
Thanks,
Liz.

:

No problem, Liz. Let's start with opening the form to add a record:
Open your form in Design view
Right Click on the Command Button you use to open the Study details1 form
Select Properties - You will get a dialog box
Select the Events Tab
Click in the empty box next to On Click:
On the right you will see a small command button with dots [...]
Click on that button
Select Code Builder
The VBA Editor will open with the sub for the Click Event created.
Paste this line in:
DoCmd.OpenForm "Study details1", DataMode:= acAdd

Now for where you open it for editing. You posted the code as to where that
happens. Just modify it as below:
Private Sub Combo25_AfterUpdate()
DoCmd.OpenForm "Study details1", _
WhereCondition:="StudyRefNo=FORMS![Start up form]!Combo25", _
DataMode:= acEdit
End Sub

If you need to know how to get to it, follow the steps above except that you
right click on your combo box and select After Update instead of On Click

Post back if you need more help.

:

Hi,
Many thanks for replying to my problem. I haven't had much experience in
working with the actual coding so I hope you don't mind me replying to you
for more help - I hope you can stay with me as I'd be so happy to fix my
problem.
Would it be possible to tell me exactly what to click on - I've never used
the 'datamode argument' I don't think. Where do I copy the coding you have
given to me. I wasn't joking when I said step-by-step instructions!! Please
bear with me. Look forward to hearing from you again.
Thanks,
Liz.

:

Simple, use the DataMode argument of the OpenForm method:
to open the form in edit mode:

DoCmd.OpenForm "Study details1", _
WhereCondition:="StudyRefNo=FORMS![Start up form]!Combo25", _
DataMode:= acEdit

to open the form for adding:
DoCmd.OpenForm "Study details1", DataMode:= acAdd


:

Hi,
I hope that someone can help me out with a problem I have encountered with
my Access database which holds details of clinical studies. I have a start-up
form which has a combo box where you can click on the primary key, StudyRefNo
and this will take you to the ‘study details’ form and show you the record
that you had just selected in the combo box. To enable this, I used the code:

Private Sub Combo25_AfterUpdate()
DoCmd.OpenForm "Study details1", WhereCondition:="StudyRefNo=FORMS![Start up
form]!Combo25"

End Sub

However, I also have on the start-up form a command button to open the form
‘Study details1’. I wanted the study details form to open here blank, so I
can add a new record, but I had to remove the coding:

RunCommand acCmdRecordsGoToNew

to enable this new recordset, in order to enable the coding above to run for
the combo box. Instead, now, on open it shows the first record already
stored.

So I’d like to have my combo box still working as it is but for my command
button to open the study details form to allow a new record to be entered.

I’d be very grateful if someone could help me out (in step by step simple
instructions if possible, as I need this!!)
Thanks,
Liz.
 
G

Guest

Hi there,

I have put the code in the command button to give a new record on click -
and that now works! However!!... when the study details1 form opens up,
although there is a blank form for a new record, my combo box no longer
works. My combo box is on there to find record, e.g to find study number 7, I
click the 7 in the combo box and it should display all the data entered for
that record. Instead, all the fields are blank except the primary field,
studyno, which has 7 in it.
So everything has worked so far, except my combo box won't work on the study
details form after I've pressed the command button to open the form up on the
start-up/main form.
Hope that makes sense and you can help again.

Kind regards,
Liz.

Liverlass3981 said:
Hi Klatuu,
Good to hear from you again - thanks.

I started to do what you said, right click on properties on the command
button to open the study
details form and I clicked on the Events tab and found the On-click. However,
when I clicked on the dots, it took me straight to the VBA window instead of
giving me a choice to select Code builder. It took me to the VBA window to
the following code:
Private Sub openstudydetsup_Click()
On Error GoTo Err_openstudydetsup_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Study details1"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_openstudydetsup_Click:
Exit Sub

Err_openstudydetsup_Click:
MsgBox Err.Description
Resume Exit_openstudydetsup_Click

End Sub

I’m wondering if this coding needs to be deleted in order to put in the
coding that you gave to me to paste in, or whether it needs to be
incorporated into the coding?

Hope that makes sense.

Look forward to hearing from you.
Thanks,
Liz.



Klatuu said:
Sorry to be sdo long getting back. I have been off for the last week and not
able to respond. Bring me uip to date on where we are so we can get this
done.

Liverlass3981 said:
Hi Klattu,

Just wondering if you were still there to help me finish fixing my problem?
I'd be so happy if you could see me through this, as I'd like to be able to
do this design on future databases too.
Hope you can get back to me!
Regards,
Liz.

:


Hi there,

Many thanks for your response – much appreciated. I started to do what you
said, right click on properties on the command button to open the study
details form and I clicked on the Events tab and found the On-click. However,
when I clicked on the dots, it took me straight to the VBA window instead of
giving me a choice to select Code builder. It took me to the VBA window to
the following code:
Private Sub openstudydetsup_Click()
On Error GoTo Err_openstudydetsup_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Study details1"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_openstudydetsup_Click:
Exit Sub

Err_openstudydetsup_Click:
MsgBox Err.Description
Resume Exit_openstudydetsup_Click

End Sub

I’m wondering if this coding needs to be deleted in order to put in the
coding that you gave to me to paste in, or whether it needs to be
incorporated into the coding?

Hope that makes sense.

Look forward to hearing from you.
Thanks,
Liz.

:

No problem, Liz. Let's start with opening the form to add a record:
Open your form in Design view
Right Click on the Command Button you use to open the Study details1 form
Select Properties - You will get a dialog box
Select the Events Tab
Click in the empty box next to On Click:
On the right you will see a small command button with dots [...]
Click on that button
Select Code Builder
The VBA Editor will open with the sub for the Click Event created.
Paste this line in:
DoCmd.OpenForm "Study details1", DataMode:= acAdd

Now for where you open it for editing. You posted the code as to where that
happens. Just modify it as below:
Private Sub Combo25_AfterUpdate()
DoCmd.OpenForm "Study details1", _
WhereCondition:="StudyRefNo=FORMS![Start up form]!Combo25", _
DataMode:= acEdit
End Sub

If you need to know how to get to it, follow the steps above except that you
right click on your combo box and select After Update instead of On Click

Post back if you need more help.

:

Hi,
Many thanks for replying to my problem. I haven't had much experience in
working with the actual coding so I hope you don't mind me replying to you
for more help - I hope you can stay with me as I'd be so happy to fix my
problem.
Would it be possible to tell me exactly what to click on - I've never used
the 'datamode argument' I don't think. Where do I copy the coding you have
given to me. I wasn't joking when I said step-by-step instructions!! Please
bear with me. Look forward to hearing from you again.
Thanks,
Liz.

:

Simple, use the DataMode argument of the OpenForm method:
to open the form in edit mode:

DoCmd.OpenForm "Study details1", _
WhereCondition:="StudyRefNo=FORMS![Start up form]!Combo25", _
DataMode:= acEdit

to open the form for adding:
DoCmd.OpenForm "Study details1", DataMode:= acAdd


:

Hi,
I hope that someone can help me out with a problem I have encountered with
my Access database which holds details of clinical studies. I have a start-up
form which has a combo box where you can click on the primary key, StudyRefNo
and this will take you to the ‘study details’ form and show you the record
that you had just selected in the combo box. To enable this, I used the code:

Private Sub Combo25_AfterUpdate()
DoCmd.OpenForm "Study details1", WhereCondition:="StudyRefNo=FORMS![Start up
form]!Combo25"

End Sub

However, I also have on the start-up form a command button to open the form
‘Study details1’. I wanted the study details form to open here blank, so I
can add a new record, but I had to remove the coding:

RunCommand acCmdRecordsGoToNew

to enable this new recordset, in order to enable the coding above to run for
the combo box. Instead, now, on open it shows the first record already
stored.

So I’d like to have my combo box still working as it is but for my command
button to open the study details form to allow a new record to be entered.

I’d be very grateful if someone could help me out (in step by step simple
instructions if possible, as I need this!!)
Thanks,
Liz.
 
G

Guest

This would be expected. You are now in Add mode which means you can only add
new records. You would not be looking up records at this point.

Liverlass3981 said:
Hi there,

I have put the code in the command button to give a new record on click -
and that now works! However!!... when the study details1 form opens up,
although there is a blank form for a new record, my combo box no longer
works. My combo box is on there to find record, e.g to find study number 7, I
click the 7 in the combo box and it should display all the data entered for
that record. Instead, all the fields are blank except the primary field,
studyno, which has 7 in it.
So everything has worked so far, except my combo box won't work on the study
details form after I've pressed the command button to open the form up on the
start-up/main form.
Hope that makes sense and you can help again.

Kind regards,
Liz.

Liverlass3981 said:
Hi Klatuu,
Good to hear from you again - thanks.

I started to do what you said, right click on properties on the command
button to open the study
details form and I clicked on the Events tab and found the On-click. However,
when I clicked on the dots, it took me straight to the VBA window instead of
giving me a choice to select Code builder. It took me to the VBA window to
the following code:
Private Sub openstudydetsup_Click()
On Error GoTo Err_openstudydetsup_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Study details1"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_openstudydetsup_Click:
Exit Sub

Err_openstudydetsup_Click:
MsgBox Err.Description
Resume Exit_openstudydetsup_Click

End Sub

I’m wondering if this coding needs to be deleted in order to put in the
coding that you gave to me to paste in, or whether it needs to be
incorporated into the coding?

Hope that makes sense.

Look forward to hearing from you.
Thanks,
Liz.



Klatuu said:
Sorry to be sdo long getting back. I have been off for the last week and not
able to respond. Bring me uip to date on where we are so we can get this
done.

:

Hi Klattu,

Just wondering if you were still there to help me finish fixing my problem?
I'd be so happy if you could see me through this, as I'd like to be able to
do this design on future databases too.
Hope you can get back to me!
Regards,
Liz.

:


Hi there,

Many thanks for your response – much appreciated. I started to do what you
said, right click on properties on the command button to open the study
details form and I clicked on the Events tab and found the On-click. However,
when I clicked on the dots, it took me straight to the VBA window instead of
giving me a choice to select Code builder. It took me to the VBA window to
the following code:
Private Sub openstudydetsup_Click()
On Error GoTo Err_openstudydetsup_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Study details1"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_openstudydetsup_Click:
Exit Sub

Err_openstudydetsup_Click:
MsgBox Err.Description
Resume Exit_openstudydetsup_Click

End Sub

I’m wondering if this coding needs to be deleted in order to put in the
coding that you gave to me to paste in, or whether it needs to be
incorporated into the coding?

Hope that makes sense.

Look forward to hearing from you.
Thanks,
Liz.

:

No problem, Liz. Let's start with opening the form to add a record:
Open your form in Design view
Right Click on the Command Button you use to open the Study details1 form
Select Properties - You will get a dialog box
Select the Events Tab
Click in the empty box next to On Click:
On the right you will see a small command button with dots [...]
Click on that button
Select Code Builder
The VBA Editor will open with the sub for the Click Event created.
Paste this line in:
DoCmd.OpenForm "Study details1", DataMode:= acAdd

Now for where you open it for editing. You posted the code as to where that
happens. Just modify it as below:
Private Sub Combo25_AfterUpdate()
DoCmd.OpenForm "Study details1", _
WhereCondition:="StudyRefNo=FORMS![Start up form]!Combo25", _
DataMode:= acEdit
End Sub

If you need to know how to get to it, follow the steps above except that you
right click on your combo box and select After Update instead of On Click

Post back if you need more help.

:

Hi,
Many thanks for replying to my problem. I haven't had much experience in
working with the actual coding so I hope you don't mind me replying to you
for more help - I hope you can stay with me as I'd be so happy to fix my
problem.
Would it be possible to tell me exactly what to click on - I've never used
the 'datamode argument' I don't think. Where do I copy the coding you have
given to me. I wasn't joking when I said step-by-step instructions!! Please
bear with me. Look forward to hearing from you again.
Thanks,
Liz.

:

Simple, use the DataMode argument of the OpenForm method:
to open the form in edit mode:

DoCmd.OpenForm "Study details1", _
WhereCondition:="StudyRefNo=FORMS![Start up form]!Combo25", _
DataMode:= acEdit

to open the form for adding:
DoCmd.OpenForm "Study details1", DataMode:= acAdd


:

Hi,
I hope that someone can help me out with a problem I have encountered with
my Access database which holds details of clinical studies. I have a start-up
form which has a combo box where you can click on the primary key, StudyRefNo
and this will take you to the ‘study details’ form and show you the record
that you had just selected in the combo box. To enable this, I used the code:

Private Sub Combo25_AfterUpdate()
DoCmd.OpenForm "Study details1", WhereCondition:="StudyRefNo=FORMS![Start up
form]!Combo25"

End Sub

However, I also have on the start-up form a command button to open the form
‘Study details1’. I wanted the study details form to open here blank, so I
can add a new record, but I had to remove the coding:

RunCommand acCmdRecordsGoToNew

to enable this new recordset, in order to enable the coding above to run for
the combo box. Instead, now, on open it shows the first record already
stored.

So I’d like to have my combo box still working as it is but for my command
button to open the study details form to allow a new record to be entered.

I’d be very grateful if someone could help me out (in step by step simple
instructions if possible, as I need this!!)
Thanks,
Liz.
 
G

Guest

That is fine Klatuu. That is actually better for me now - since the user can
now edit any records with the other combo box on the open-up form we did, to
take you to a certain record. Thanks very much for all of your help. I am
really pleased with what you have shown me.
Best regards,
Liz.

Klatuu said:
This would be expected. You are now in Add mode which means you can only add
new records. You would not be looking up records at this point.

Liverlass3981 said:
Hi there,

I have put the code in the command button to give a new record on click -
and that now works! However!!... when the study details1 form opens up,
although there is a blank form for a new record, my combo box no longer
works. My combo box is on there to find record, e.g to find study number 7, I
click the 7 in the combo box and it should display all the data entered for
that record. Instead, all the fields are blank except the primary field,
studyno, which has 7 in it.
So everything has worked so far, except my combo box won't work on the study
details form after I've pressed the command button to open the form up on the
start-up/main form.
Hope that makes sense and you can help again.

Kind regards,
Liz.

Liverlass3981 said:
Hi Klatuu,
Good to hear from you again - thanks.

I started to do what you said, right click on properties on the command
button to open the study
details form and I clicked on the Events tab and found the On-click. However,
when I clicked on the dots, it took me straight to the VBA window instead of
giving me a choice to select Code builder. It took me to the VBA window to
the following code:
Private Sub openstudydetsup_Click()
On Error GoTo Err_openstudydetsup_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Study details1"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_openstudydetsup_Click:
Exit Sub

Err_openstudydetsup_Click:
MsgBox Err.Description
Resume Exit_openstudydetsup_Click

End Sub

I’m wondering if this coding needs to be deleted in order to put in the
coding that you gave to me to paste in, or whether it needs to be
incorporated into the coding?

Hope that makes sense.

Look forward to hearing from you.
Thanks,
Liz.



:

Sorry to be sdo long getting back. I have been off for the last week and not
able to respond. Bring me uip to date on where we are so we can get this
done.

:

Hi Klattu,

Just wondering if you were still there to help me finish fixing my problem?
I'd be so happy if you could see me through this, as I'd like to be able to
do this design on future databases too.
Hope you can get back to me!
Regards,
Liz.

:


Hi there,

Many thanks for your response – much appreciated. I started to do what you
said, right click on properties on the command button to open the study
details form and I clicked on the Events tab and found the On-click. However,
when I clicked on the dots, it took me straight to the VBA window instead of
giving me a choice to select Code builder. It took me to the VBA window to
the following code:
Private Sub openstudydetsup_Click()
On Error GoTo Err_openstudydetsup_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Study details1"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_openstudydetsup_Click:
Exit Sub

Err_openstudydetsup_Click:
MsgBox Err.Description
Resume Exit_openstudydetsup_Click

End Sub

I’m wondering if this coding needs to be deleted in order to put in the
coding that you gave to me to paste in, or whether it needs to be
incorporated into the coding?

Hope that makes sense.

Look forward to hearing from you.
Thanks,
Liz.

:

No problem, Liz. Let's start with opening the form to add a record:
Open your form in Design view
Right Click on the Command Button you use to open the Study details1 form
Select Properties - You will get a dialog box
Select the Events Tab
Click in the empty box next to On Click:
On the right you will see a small command button with dots [...]
Click on that button
Select Code Builder
The VBA Editor will open with the sub for the Click Event created.
Paste this line in:
DoCmd.OpenForm "Study details1", DataMode:= acAdd

Now for where you open it for editing. You posted the code as to where that
happens. Just modify it as below:
Private Sub Combo25_AfterUpdate()
DoCmd.OpenForm "Study details1", _
WhereCondition:="StudyRefNo=FORMS![Start up form]!Combo25", _
DataMode:= acEdit
End Sub

If you need to know how to get to it, follow the steps above except that you
right click on your combo box and select After Update instead of On Click

Post back if you need more help.

:

Hi,
Many thanks for replying to my problem. I haven't had much experience in
working with the actual coding so I hope you don't mind me replying to you
for more help - I hope you can stay with me as I'd be so happy to fix my
problem.
Would it be possible to tell me exactly what to click on - I've never used
the 'datamode argument' I don't think. Where do I copy the coding you have
given to me. I wasn't joking when I said step-by-step instructions!! Please
bear with me. Look forward to hearing from you again.
Thanks,
Liz.

:

Simple, use the DataMode argument of the OpenForm method:
to open the form in edit mode:

DoCmd.OpenForm "Study details1", _
WhereCondition:="StudyRefNo=FORMS![Start up form]!Combo25", _
DataMode:= acEdit

to open the form for adding:
DoCmd.OpenForm "Study details1", DataMode:= acAdd


:

Hi,
I hope that someone can help me out with a problem I have encountered with
my Access database which holds details of clinical studies. I have a start-up
form which has a combo box where you can click on the primary key, StudyRefNo
and this will take you to the ‘study details’ form and show you the record
that you had just selected in the combo box. To enable this, I used the code:

Private Sub Combo25_AfterUpdate()
DoCmd.OpenForm "Study details1", WhereCondition:="StudyRefNo=FORMS![Start up
form]!Combo25"

End Sub

However, I also have on the start-up form a command button to open the form
‘Study details1’. I wanted the study details form to open here blank, so I
can add a new record, but I had to remove the coding:

RunCommand acCmdRecordsGoToNew

to enable this new recordset, in order to enable the coding above to run for
the combo box. Instead, now, on open it shows the first record already
stored.

So I’d like to have my combo box still working as it is but for my command
button to open the study details form to allow a new record to be entered.

I’d be very grateful if someone could help me out (in step by step simple
instructions if possible, as I need this!!)
Thanks,
Liz.
 
G

Guest

Glad I could help. My apologies for taking time off while you have a problem
:)

Liverlass3981 said:
That is fine Klatuu. That is actually better for me now - since the user can
now edit any records with the other combo box on the open-up form we did, to
take you to a certain record. Thanks very much for all of your help. I am
really pleased with what you have shown me.
Best regards,
Liz.

Klatuu said:
This would be expected. You are now in Add mode which means you can only add
new records. You would not be looking up records at this point.

Liverlass3981 said:
Hi there,

I have put the code in the command button to give a new record on click -
and that now works! However!!... when the study details1 form opens up,
although there is a blank form for a new record, my combo box no longer
works. My combo box is on there to find record, e.g to find study number 7, I
click the 7 in the combo box and it should display all the data entered for
that record. Instead, all the fields are blank except the primary field,
studyno, which has 7 in it.
So everything has worked so far, except my combo box won't work on the study
details form after I've pressed the command button to open the form up on the
start-up/main form.
Hope that makes sense and you can help again.

Kind regards,
Liz.

:

Hi Klatuu,
Good to hear from you again - thanks.

I started to do what you said, right click on properties on the command
button to open the study
details form and I clicked on the Events tab and found the On-click. However,
when I clicked on the dots, it took me straight to the VBA window instead of
giving me a choice to select Code builder. It took me to the VBA window to
the following code:
Private Sub openstudydetsup_Click()
On Error GoTo Err_openstudydetsup_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Study details1"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_openstudydetsup_Click:
Exit Sub

Err_openstudydetsup_Click:
MsgBox Err.Description
Resume Exit_openstudydetsup_Click

End Sub

I’m wondering if this coding needs to be deleted in order to put in the
coding that you gave to me to paste in, or whether it needs to be
incorporated into the coding?

Hope that makes sense.

Look forward to hearing from you.
Thanks,
Liz.



:

Sorry to be sdo long getting back. I have been off for the last week and not
able to respond. Bring me uip to date on where we are so we can get this
done.

:

Hi Klattu,

Just wondering if you were still there to help me finish fixing my problem?
I'd be so happy if you could see me through this, as I'd like to be able to
do this design on future databases too.
Hope you can get back to me!
Regards,
Liz.

:


Hi there,

Many thanks for your response – much appreciated. I started to do what you
said, right click on properties on the command button to open the study
details form and I clicked on the Events tab and found the On-click. However,
when I clicked on the dots, it took me straight to the VBA window instead of
giving me a choice to select Code builder. It took me to the VBA window to
the following code:
Private Sub openstudydetsup_Click()
On Error GoTo Err_openstudydetsup_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Study details1"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_openstudydetsup_Click:
Exit Sub

Err_openstudydetsup_Click:
MsgBox Err.Description
Resume Exit_openstudydetsup_Click

End Sub

I’m wondering if this coding needs to be deleted in order to put in the
coding that you gave to me to paste in, or whether it needs to be
incorporated into the coding?

Hope that makes sense.

Look forward to hearing from you.
Thanks,
Liz.

:

No problem, Liz. Let's start with opening the form to add a record:
Open your form in Design view
Right Click on the Command Button you use to open the Study details1 form
Select Properties - You will get a dialog box
Select the Events Tab
Click in the empty box next to On Click:
On the right you will see a small command button with dots [...]
Click on that button
Select Code Builder
The VBA Editor will open with the sub for the Click Event created.
Paste this line in:
DoCmd.OpenForm "Study details1", DataMode:= acAdd

Now for where you open it for editing. You posted the code as to where that
happens. Just modify it as below:
Private Sub Combo25_AfterUpdate()
DoCmd.OpenForm "Study details1", _
WhereCondition:="StudyRefNo=FORMS![Start up form]!Combo25", _
DataMode:= acEdit
End Sub

If you need to know how to get to it, follow the steps above except that you
right click on your combo box and select After Update instead of On Click

Post back if you need more help.

:

Hi,
Many thanks for replying to my problem. I haven't had much experience in
working with the actual coding so I hope you don't mind me replying to you
for more help - I hope you can stay with me as I'd be so happy to fix my
problem.
Would it be possible to tell me exactly what to click on - I've never used
the 'datamode argument' I don't think. Where do I copy the coding you have
given to me. I wasn't joking when I said step-by-step instructions!! Please
bear with me. Look forward to hearing from you again.
Thanks,
Liz.

:

Simple, use the DataMode argument of the OpenForm method:
to open the form in edit mode:

DoCmd.OpenForm "Study details1", _
WhereCondition:="StudyRefNo=FORMS![Start up form]!Combo25", _
DataMode:= acEdit

to open the form for adding:
DoCmd.OpenForm "Study details1", DataMode:= acAdd


:

Hi,
I hope that someone can help me out with a problem I have encountered with
my Access database which holds details of clinical studies. I have a start-up
form which has a combo box where you can click on the primary key, StudyRefNo
and this will take you to the ‘study details’ form and show you the record
that you had just selected in the combo box. To enable this, I used the code:

Private Sub Combo25_AfterUpdate()
DoCmd.OpenForm "Study details1", WhereCondition:="StudyRefNo=FORMS![Start up
form]!Combo25"

End Sub

However, I also have on the start-up form a command button to open the form
‘Study details1’. I wanted the study details form to open here blank, so I
can add a new record, but I had to remove the coding:

RunCommand acCmdRecordsGoToNew

to enable this new recordset, in order to enable the coding above to run for
the combo box. Instead, now, on open it shows the first record already
stored.

So I’d like to have my combo box still working as it is but for my command
button to open the study details form to allow a new record to be entered.

I’d be very grateful if someone could help me out (in step by step simple
instructions if possible, as I need this!!)
Thanks,
Liz.
 

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

Top