Add/Update form info

cktcPeterson

Member
Local time
Today, 07:17
Joined
Mar 23, 2022
Messages
74
Is there a way when I open my form to go to a specific field
[StudentID] and activate my onclick macro?

I have a on open macro
Goto Control -This work.
Now I just want the onclick macro to run.
 
Put the OnClick code in a separate Sub in the form. Call it MyClickCode

Then call that Sub (MyClickCode ) in both the form load and on the OnClick event. Simples...
 
I figured it out. On the properties tab, I changed allow edit to yes. I have been working on this for months.
 
What is the point of this? If you want to control which which control gets the focus when a form opens, you can alter the tab order. Start by opening the form in design view. Go to the tab order dialog and click the auto order button. This might fix your problem if the first physical field is the one you want to get the focus. Otherwise, if you don't want to change the order of the fields on the form but you want the fourth field to be the one to get the focus, Open the properties of that control and set the tab order to 1. Now this field is out of order. The tab order of the controls will be 2, 3, 4, 1, 5, 6, 7. So, focus starts in the fourth control. When you tab, focus goes to the first control on the form because it is the next control in the tab order. The tab moves through controls based on the value in the tab order field. Sometimes, we never want the user to be able to change particular fields. You can set the tab stop of those fields to No. If you do that to the first three fields, you don't have to change the value of the fourth fields tab order property at all. 1, 2, 3, are locked so focus automatically starts at 4.
 
Thank you. I figured it out. I just needed to put yes to allow edits. It was simpler than I thought.
 

Users who are viewing this thread

Back
Top Bottom