Form Layout and design

Cindy

Registered User.
Local time
Today, 15:03
Joined
Jul 3, 2014
Messages
160
hi, I am still green and my VB skills are not strong. I have created a data entry form with many tabs. I DON'T want my save, cancel, update and delete buttons on each page. How can I make them universal on this form? Any help is much appreciated.
 
I have created a data entry form with many tabs. I DON'T want my save, cancel, update and delete buttons on each page.

Your words are incongrous--tabs and pages are distinct elements. Which do you have?

If you are using a tab control simply put your buttons outside of the tab control, that way they remain on the screen no matter which tab is veing viewed in the tab control.
 
I have a tab control into which I inserted pages. These are what I was referring to. I moved the buttons OUT of the tab control box but it automatically extends to include the button:confused:
 
Your words are incongrous--tabs and pages are distinct elements. Which do you have?

If you are using a tab control simply put your buttons outside of the tab control, that way they remain on the screen no matter which tab is veing viewed in the tab control.
plog she's after code that will make the save, cancel, update and delete actions universal to all the subforms on each of her tabs. The buttons are on the main form.
 
I think you have to delete them and add new ones to the form itself. You could also copy and paste it outside the form, but you have to manually restore any events attached to those buttons.
 
Hi, I figured it out. I simply deleted the ones that I'd pasted previously on the tab page and clicked a new button control outside of the Tab.

Sorry for my ignorance but I'm learning a lot from this site already. I need help with the VB code for my SAVE CANCEL DELETE and UPDATE buttons.
Your help is much appreciated.
 
yes thanks plog. I did that and it worked. I came across this code:
DoCmd.RunCommand acCmdSaveRecord.
It seemed to work but does not clear the form afterwards.

I need help with the VB code for my SAVE CANCEL DELETE and UPDATE buttons. Your help is much appreciated.
 
This is heading into advanced level stuff. Why are you setting up your forms this way? Why not just have all the form inputs bound to the table fields they will be put into?

My guess is you already have it set as a bound form, otherwise you'd be asking how to load your data into your unbound form.

So, why are you doing it this way and not just letting Access handle the saving of the data?
 
hi Plog, thanks for your feedback. Please bare in mind that I'm still fairly green with Access programming. I want to use this form to update a number of tables and thought it made sense to specify the table(s) associated with it...?
 
By default, Access doesn't need you to give it action buttons to save data, it just does it. That's the simplest way to handle things, the method you want to use requires a lot of coding and adds little value.

I'd suggest allowing Access to handle it by binding your tables to the form. When you change data in your form now, what happens at the table level? It should reflect whatever changes you made.
 
I think your buttons should still work anyway. If you followed the wizard to create the buttons I think it creates a global code that uses the active form and active control as a pointer. And since you're using a tab switching between tabs is a doddle because it sets focus on the subform itself.

By the way, you do realise that when you move between tabs records that haven't been saved will get saved.
 
thanks vbaInet and Plog.

vbaInet just to be clear, are you saying that switching between tabs saves the updates on them...?
 
didn't know that but that's good since it will all go on the one record. I didn't create the buttons with the wizard. I just clicked on the button. I'm looking and can't seem to find the darn wizard.
 
Cindy,

In addition to what has already been stated, as you are, as you said, green to this. To apply a *universal* DELETE, UPDATE and CANCEL becomes very tricky because you would have to tell Access which Tab/Subform as once you leave the Tab it no longer has the focus and whill become confused as to what you are actually trying to DELETE.

A better scenario would be to put the buttons on the same place on each Tab thereby making it *appear* as if there is one set of buttons. Keeps the tidy and you can get the desired results, well, visually anyway.
 
The "darn" wizard fires up the moment you draw the control on your form.
 
hey thanks GinaWhipp:) The DELETE is to remove the entire record from the table. All the tabs will be linked to that one ID. If there is an error on the tab page, the user can correct it themselves but the delete button would be for a record that they don't want to be on the table anymore.
 
hey vbaInet, I know it is very basic and I thank you for your patience. The wizard did not appear when I clicked the button control. I need that magic right now :mad:
 
I know I know. Nothing fires when I draw all over the place:o All this is making me hungry. If I wasn't annoyed with myself I'd go for lunch! Apparently, the Access I have on my machine wasn't fully installed. IT is going to fix that. Thanks again
 

Users who are viewing this thread

Back
Top Bottom