Click from another navigation

ilanray

Member
Local time
Today, 18:37
Joined
Jan 3, 2023
Messages
129
Hi
I have 2 navigation buttons.at the first navigation i have a torm with save button called SaveForm
I would like to click on the second navigationbutton and it will active the button SaveForm which is in the first button, how can i do it?
 
Me.SaveForm.Enabled = True. ???
 
No, i get an error message "method or data member not found
 
No, i get an error message "method or data member not found
Well the SaveForm part is meant to be the name of your button? :(

Me.TheNameOfYourActualButtonThatYouHaveForSavingTheForm.Enabled = True. ???
 
I create a sub procedure called save_click_g() in form TaskForm. I create a button call this procudure
PHP:
public sub save_click()
        save_click_g
end sub
and it works greate

The problem I am talking about is, I have navigation tabs and inside i have the TaskForm with the sub procedure and the button
I have another form called xx , I created as you said the call procedure and I still get an error message "sub or function not defined"
 
you try to upload a sample db and describe again what need to be done.
 
So how do I go from one navigation to another without loosing all the data I wrote (in case I forgot to click save at the first form)?
 
? When you add / edit data and move to another record access will save your data without an explicit save option, if the data conforms to the constraints defined for the table(s), or other constraints you might impose through vba. When you have "unsaved" data and select the other "navigation" ?? what happens - is the data lost?
If you find you need to save the data entered when you navigate, then invoke some vba on the navigate option (on click?) to tell access to save the data.
if you cannot do this then you need to provide a sample copy of your database (with non-sensitive data) and clearly describe what happens and what you want to happen
 
Hi
Attach an example, Please click on the "NAvigationMain" form. then add some data , don't click on save . just go to the next navigation tab. I would like to vba code will use the save command from the first form
 

Attachments

test this one.
note i copied all forms and tables to new db, since you have cyrillic alphabet on some of your controlnames.
 

Attachments

so what you did is create click event to the second navigation tab . this is now what I mean. I would like to use the button from the first navigation tabs becuase at my original application I have a lot of logic in the save button and I can't ducplicated it
 
as mentioned before, when you click on another Tab, the subform will Close.
if you have lots of code, duplicate it on the Click event of the tab.
 
as mentioned before, when you click on another Tab, the subform will Close.
if you have lots of code, duplicate it on the Click event of the tab.
Or create a module and call that code from each event?
 
I tried to do it on a module . How can I call use the insert command on the module? I have to use something like [form]!... any syntax didn't go well
 
You just gave me an idea. I create an event on form_close(). so everytime the user will go from one form to another
 
the form is Unbound so BeforeUpdate (AferUpdate also) will not get triggered.
 

Users who are viewing this thread

Back
Top Bottom