Start subform on a blank record

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form named "Report Analysis" and a subform named "QMP Update", so
for the report analysis form I have a number of records and each record in
the form has many records in the subform. So, my problem is that, if I have 5
records in the subform, when I open the related record on the form the
subform is starting on record 1 and not a blank record. So basically, I need
my subform to start on the "new record". Thanks for any help.
 
In the OnCurrent event of the main form, you can add the code

Me.[SubFormControlName].SetFocus
DoCmd.GoToRecord , , acNewRec

so it will move to a new record
 
Thank you for the help. It did start on a new record but I can not move to
previous records which I still want to do if it is possible. Is there
something else I can add to the code? Thanks again.

Ofer Cohen said:
In the OnCurrent event of the main form, you can add the code

Me.[SubFormControlName].SetFocus
DoCmd.GoToRecord , , acNewRec

so it will move to a new record

--
Good Luck
BS"D


Nick said:
I have a form named "Report Analysis" and a subform named "QMP Update", so
for the report analysis form I have a number of records and each record in
the form has many records in the subform. So, my problem is that, if I have 5
records in the subform, when I open the related record on the form the
subform is starting on record 1 and not a blank record. So basically, I need
my subform to start on the "new record". Thanks for any help.
 
You should be able to move to the previous records.

Does the NavigationButtons Property of the sub form set to Yes?
If No, set it to Yes and try to use the navigation buttons to move between
records.


--
Good Luck
BS"D


Nick said:
Thank you for the help. It did start on a new record but I can not move to
previous records which I still want to do if it is possible. Is there
something else I can add to the code? Thanks again.

Ofer Cohen said:
In the OnCurrent event of the main form, you can add the code

Me.[SubFormControlName].SetFocus
DoCmd.GoToRecord , , acNewRec

so it will move to a new record

--
Good Luck
BS"D


Nick said:
I have a form named "Report Analysis" and a subform named "QMP Update", so
for the report analysis form I have a number of records and each record in
the form has many records in the subform. So, my problem is that, if I have 5
records in the subform, when I open the related record on the form the
subform is starting on record 1 and not a blank record. So basically, I need
my subform to start on the "new record". Thanks for any help.
 
The naviagtionButtons Property is set to yes for the main form and subform.
Any other possibilities for my problem would be very helpful. Thanks for your
time and patience.

Ofer Cohen said:
You should be able to move to the previous records.

Does the NavigationButtons Property of the sub form set to Yes?
If No, set it to Yes and try to use the navigation buttons to move between
records.


--
Good Luck
BS"D


Nick said:
Thank you for the help. It did start on a new record but I can not move to
previous records which I still want to do if it is possible. Is there
something else I can add to the code? Thanks again.

Ofer Cohen said:
In the OnCurrent event of the main form, you can add the code

Me.[SubFormControlName].SetFocus
DoCmd.GoToRecord , , acNewRec

so it will move to a new record

--
Good Luck
BS"D


:

I have a form named "Report Analysis" and a subform named "QMP Update", so
for the report analysis form I have a number of records and each record in
the form has many records in the subform. So, my problem is that, if I have 5
records in the subform, when I open the related record on the form the
subform is starting on record 1 and not a blank record. So basically, I need
my subform to start on the "new record". Thanks for any help.
 
I tried this and got the following error message when opening the form...

DGS Purchasing Cards can't find Macro 'ME.'

Any assistance would be greatly appreciated.

Thanks,
--
Scott


Nick said:
The naviagtionButtons Property is set to yes for the main form and subform.
Any other possibilities for my problem would be very helpful. Thanks for your
time and patience.

Ofer Cohen said:
You should be able to move to the previous records.

Does the NavigationButtons Property of the sub form set to Yes?
If No, set it to Yes and try to use the navigation buttons to move between
records.


--
Good Luck
BS"D


Nick said:
Thank you for the help. It did start on a new record but I can not move to
previous records which I still want to do if it is possible. Is there
something else I can add to the code? Thanks again.

:

In the OnCurrent event of the main form, you can add the code

Me.[SubFormControlName].SetFocus
DoCmd.GoToRecord , , acNewRec

so it will move to a new record

--
Good Luck
BS"D


:

I have a form named "Report Analysis" and a subform named "QMP Update", so
for the report analysis form I have a number of records and each record in
the form has many records in the subform. So, my problem is that, if I have 5
records in the subform, when I open the related record on the form the
subform is starting on record 1 and not a blank record. So basically, I need
my subform to start on the "new record". Thanks for any help.
 
Back
Top