I have a form with two subforms and one subform has a subform. I want the subform of the subform to go to the new record
I have a form with two subforms and one subform has a subform. I want the subform of the subform to go to the new record
Last edited by survivo01; 10-28-2012 at 01:28 PM.
Perhaps the following line of code in the sub forms On Open event is what you need:
DoCmd.GoToRecord , , acLast
If this helped, please click the star at the bottom left of this posting and add to my reputation. Many thanks.
Bob Fitzpatrick
This may sound dumb! I do not know where you find "open event". I would think this command goes some where on the property sheet. I have 2010. C orrection I now think you mean the event tab on the property sheet. Where I go wrong is which form to place the event. Also, what each event does. Is there definitions somewhere for each event. Orignally, I meant to say new record not last record. However, actually I don't want any record selected. I have several feilds in my form that are true false. The true fields are formatted a different color. However, when the select record feature highlights a row in my form data heet it washes out the colors in my true fields on the row that is selected. I was able to make the data sheet form select new record on the form. However, when I make it a subform I will get messages cannot do command because form is not open.
Last edited by survivo01; 10-28-2012 at 02:01 PM. Reason: confusing question
You may find this link about links will be of help: http://office.microsoft.com/en-us/ac...005186761.aspx
To go to a new record use:
DoCmd.GoToRecord , , acNewRec
My suggestion was to use it in the On Open event of whichever form it is that you wanted to display a new record in.
If this helped, please click the star at the bottom left of this posting and add to my reputation. Many thanks.
Bob Fitzpatrick
Thanks
I can now get it to do the action in the form.
but I have the form enroll inmate
subform class schedule
subform inmates not enrolled
subform inmate schedule.
Thanks
I can now get it to do the action in the form. but it will not wrok when I make this form a subform
I have the form enroll inmate
subform class schedule
subform inmates not enrolled
subform inmate schedule. (subform of subform inmates not enrolled) It will not go to new record here
Thanks
I can now get it to do the action in the form. but it will not wrok when I make this form a subform
I have the form enroll inmate
subform class schedule
subform inmates not enrolled
subform inmate schedule. (subform of subform inmates not enrolled) It will not go to new record here
Can you give us any more detail. Have you checked that the code is fired? Do you get an error message?...but it will not work...
If this helped, please click the star at the bottom left of this posting and add to my reputation. Many thanks.
Bob Fitzpatrick
I receive no error message I don't know how to check and see if code fired. Will try to learn about that now.