If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Need Code to tab out of subform
I have just made some cosmetic changes to my subform. To get the effects of
the change, I had to change my views from Database to Continuous Forms. My problem is: When I am done entering Equipment in the subform, I can't tab out of it to go on to an item on the main form like I could before in Database view. I'm sure there is some code I can put in that last field of the subform, or somewhere, but I can't seem to make anything work. I am new to this. Thanks for any help. |
#2
|
|||
|
|||
Need Code to tab out of subform
Ron Weaver wrote: I have just made some cosmetic changes to my subform. To get the effects of the change, I had to change my views from Database to Continuous Forms. My problem is: When I am done entering Equipment in the subform, I can't tab out of it to go on to an item on the main form like I could before in Database view. I'm sure there is some code I can put in that last field of the subform, or somewhere, but I can't seem to make anything work. I am new to this. Thanks for any help. In the last field on the subform, you may want to write a code on the exist property of this field something like the below. Me![mainfom]![thefield you want to go to].setfocus THat should point you to the field you want when the last field on the subform exist. GL. |
#3
|
|||
|
|||
Need Code to tab out of subform
Ron Weaver wrote: I have just made some cosmetic changes to my subform. To get the effects of the change, I had to change my views from Database to Continuous Forms. My problem is: When I am done entering Equipment in the subform, I can't tab out of it to go on to an item on the main form like I could before in Database view. I'm sure there is some code I can put in that last field of the subform, or somewhere, but I can't seem to make anything work. I am new to this. Thanks for any help. In the last field on the subform, you may want to write a code on the exist property of this field something like the below. Me![mainfom]![name of the field you want to go to].setfocus THat should point you to the field you want when the last field on the subform exist. GL. |
#4
|
|||
|
|||
Need Code to tab out of subform
you could add code to the Exit event procedure of the last control (in the
tab order) of the subform to SetFocus back to a control in the main form, as Me.Parent!MainFormControlName.SetFocus replace MainFormControlName with the correct name of the control on the main form that you want the cursor to "land" in. but, if you do this, the user won't be able to easily add multiple records to the subform at one time, because the code will keep kicking the focus out of the subform into the main form. as an alternative, you might want to set a hot key to the main form control the user will want to move to - by "underlining" a letter in the control label's caption. you do this by adding an ampersand (&) immediately before the letter in the Caption property. for example, the following caption property in a control's label, as &First Name will underline the F in Form view, and the user can jump to that control by pressing Shift+f. having set up a hot key, you'd need to train your users to use it to get back to the main form. to an experienced data entry operator, this method quickly becomes second nature, and is much quicker than using the mouse to click into the desired field. hth wrote in message ups.com... Ron Weaver wrote: I have just made some cosmetic changes to my subform. To get the effects of the change, I had to change my views from Database to Continuous Forms. My problem is: When I am done entering Equipment in the subform, I can't tab out of it to go on to an item on the main form like I could before in Database view. I'm sure there is some code I can put in that last field of the subform, or somewhere, but I can't seem to make anything work. I am new to this. Thanks for any help. In the last field on the subform, you may want to write a code on the exist property of this field something like the below. Me![mainfom]![thefield you want to go to].setfocus THat should point you to the field you want when the last field on the subform exist. GL. |
#5
|
|||
|
|||
Need Code to tab out of subform
Thanks to you and Tina.
This gets me out of the subform ok, but before I'm through entering items. After I'm through, I need to go to the next record in the subform and just tab across to the last field. If it's blank or "0", then it takes me out of the subform. I hope this makes sense. I didn't explain it very well before. " wrote: Ron Weaver wrote: I have just made some cosmetic changes to my subform. To get the effects of the change, I had to change my views from Database to Continuous Forms. My problem is: When I am done entering Equipment in the subform, I can't tab out of it to go on to an item on the main form like I could before in Database view. I'm sure there is some code I can put in that last field of the subform, or somewhere, but I can't seem to make anything work. I am new to this. Thanks for any help. In the last field on the subform, you may want to write a code on the exist property of this field something like the below. Me![mainfom]![name of the field you want to go to].setfocus THat should point you to the field you want when the last field on the subform exist. GL. |
#6
|
|||
|
|||
Need Code to tab out of subform
well, here's another alternative that may work for you. in the subform, in
the last control's Exit event procedure, add the following code, as If Me.NewRecord Then Me.Parent!ControlName.SetFocus the above goes all on one line in the procedure, regardless of how the newreader may wrap it here. replace ControlName with the correct name of the control on the main form that you want the cursor to "land" in. hth "Ron Weaver" wrote in message ... Thanks to you and Tina. This gets me out of the subform ok, but before I'm through entering items. After I'm through, I need to go to the next record in the subform and just tab across to the last field. If it's blank or "0", then it takes me out of the subform. I hope this makes sense. I didn't explain it very well before. " wrote: Ron Weaver wrote: I have just made some cosmetic changes to my subform. To get the effects of the change, I had to change my views from Database to Continuous Forms. My problem is: When I am done entering Equipment in the subform, I can't tab out of it to go on to an item on the main form like I could before in Database view. I'm sure there is some code I can put in that last field of the subform, or somewhere, but I can't seem to make anything work. I am new to this. Thanks for any help. In the last field on the subform, you may want to write a code on the exist property of this field something like the below. Me![mainfom]![name of the field you want to go to].setfocus THat should point you to the field you want when the last field on the subform exist. GL. |
#7
|
|||
|
|||
Need Code to tab out of subform
That works perfectly.
Thanks Tina "tina" wrote: well, here's another alternative that may work for you. in the subform, in the last control's Exit event procedure, add the following code, as If Me.NewRecord Then Me.Parent!ControlName.SetFocus the above goes all on one line in the procedure, regardless of how the newreader may wrap it here. replace ControlName with the correct name of the control on the main form that you want the cursor to "land" in. hth "Ron Weaver" wrote in message ... Thanks to you and Tina. This gets me out of the subform ok, but before I'm through entering items. After I'm through, I need to go to the next record in the subform and just tab across to the last field. If it's blank or "0", then it takes me out of the subform. I hope this makes sense. I didn't explain it very well before. " wrote: Ron Weaver wrote: I have just made some cosmetic changes to my subform. To get the effects of the change, I had to change my views from Database to Continuous Forms. My problem is: When I am done entering Equipment in the subform, I can't tab out of it to go on to an item on the main form like I could before in Database view. I'm sure there is some code I can put in that last field of the subform, or somewhere, but I can't seem to make anything work. I am new to this. Thanks for any help. In the last field on the subform, you may want to write a code on the exist property of this field something like the below. Me![mainfom]![name of the field you want to go to].setfocus THat should point you to the field you want when the last field on the subform exist. GL. |
#8
|
|||
|
|||
Need Code to tab out of subform
you're welcome
"Ron Weaver" wrote in message ... That works perfectly. Thanks Tina "tina" wrote: well, here's another alternative that may work for you. in the subform, in the last control's Exit event procedure, add the following code, as If Me.NewRecord Then Me.Parent!ControlName.SetFocus the above goes all on one line in the procedure, regardless of how the newreader may wrap it here. replace ControlName with the correct name of the control on the main form that you want the cursor to "land" in. hth "Ron Weaver" wrote in message ... Thanks to you and Tina. This gets me out of the subform ok, but before I'm through entering items. After I'm through, I need to go to the next record in the subform and just tab across to the last field. If it's blank or "0", then it takes me out of the subform. I hope this makes sense. I didn't explain it very well before. " wrote: Ron Weaver wrote: I have just made some cosmetic changes to my subform. To get the effects of the change, I had to change my views from Database to Continuous Forms. My problem is: When I am done entering Equipment in the subform, I can't tab out of it to go on to an item on the main form like I could before in Database view. I'm sure there is some code I can put in that last field of the subform, or somewhere, but I can't seem to make anything work. I am new to this. Thanks for any help. In the last field on the subform, you may want to write a code on the exist property of this field something like the below. Me![mainfom]![name of the field you want to go to].setfocus THat should point you to the field you want when the last field on the subform exist. GL. |
Thread Tools | |
Display Modes | |
|
|