Full Version: How do you create a button to launch a FORM?
UtterAccess Forums > Microsoft® Access > Access Forms
rondata
Help?
And are there any quck and dirty ways to make a small menu for ADD SEARCH EXIT? (buttons perhaps?)
Also, still trying to figure out the way to launch a BLANK form, and not have it filled with data already. TIA!
JoeCosta
Turn on your WIZARD and click on the button. Thats pretty much the quick and easy way.
Yon your WIZARD and click on the button. Thats pretty much the quick and easy way.
Your second question...
On the click event add this...
DoCmd.OpenForm "FORM NAME", acNormal, , , acFormAdd, acWindowNormal
rondata
Thnaks for responding!
There is a way to turn on the wizard? As you can see, I am not very good at this.
And I tried that comand on the click event and it gave me an error.
Owanna try first to do the button to launch a blank form.. then I will worry about the rest.
Thanks for your help
mmessy00
After you have the form open in design view there is a button that looks like a wand with magic dust coming off of it (because the wizard is magical...er something)
If the button is not there, right click on the menu bar (where it says "File", "Edit", etc) and check the "Toolbox" option. Now the button should be there.
You can now click to create button and it will walk you through the rest.
rondata
DoCmd.OpenForm "FORM NAME", acNormal, , , acFormAdd, acWindowNormal
Oget this error: "Can't find the macro DoCmd" sad.gif
rondata
Okay, I got that part.. but it's still only asking me to open a form with data.. it's not giving me a wizard option to open a BLANK form :/
Is there some trick to it? ugh..
Jack Cowley
By a 'BLANK' form do you mean a form ready for data input and not showing existing records? If so then set the forms Data Entry property to Yes.
th,
Jack
rondata
Yes, because no matter what I create in a form, it always prepopulates with Data from whatever is in the database table.
Thanks
Jack Cowley
Once the form is created do as I suggested and set the forms Data Entry property to Yes. You will find this property under the Data tab of the Forms property sheet.
th,
Jack
rondata
That did help! thank you frown.gif
Jack Cowley
You are welcome and continued success with the project....
ack
rondata
TY..
did that and it opens fine, only now when I click the ADD RECORD button (after creating one successful record) it prepopulates with data again!!! sad.gif any idea why?
Jack Cowley
What type of form are you using? Is it in Datasheet view, Single Form view or Continuous Form view? Is this a main form or a subform on a form?
ack
rondata
It's a form with 3 subforms. It's 4 tables (three are related to the first table) so when you open the form, you open the data from the main form, and then 3 subforms in small windows.. am I making sense?
EMEstrada
With respect to prepopulation of fields on the form,....
If you look at the form/subform in design mode and view the various text boxes and combo boxes properties,... are there default values assigned {Data Tab} ?....if so then thats what populating your form first or there is function that pre populates designated fields with default values.
FOr When speficying subform relationshps with the parent form the relationship automatically populates the appropriate parent information into the child form.

Just Asking:
-Mono
Jack Cowley
Hmm. Not sure what is going on. If you open your main form to a new record, as you are doing all subforms should be 'blank' as there related data in the main form. Moving the main form to a new record should do the same thing. Is the main form showing the data or the subforms? If the subforms then be sure you have the Master/Child links set up correctly.
ack
rondata
Actually, it's all prepopulating, not just the subforms. No combo boxes or anything.. and they are in list view.. no speciifc fields, just like browsing tables.
The first record is empty, but then when I try to click save or add another record it populates with data.
rondata
When I click to launch the fom now, after putting data entry properties to YES - it IS blank. But then if I try to add a button to the form to add a new record when that record is complete THEN it populates with the first record in the table..
Jack Cowley
Is the code in your command button?
oCmd.GoToRecord, , acNewRec
If not, what code are you using?
Jack
rondata
Ugh, this is so frustrating.
think that button wasn't working because I changed the properties of the form and didn't change the button. Thank you for your help!
Onow have anouther issue!
When I use my form to LOCATE records (using control drop down box) and then click to DELETE a record, it deletes the record from the main table (server information) and erases the server name from the other tables, but does not delete the DATA RECORDS in the other tables!!
OMG.. what did I get myself into!? :eek
Jack Cowley
In your Relationship Window click on the join between your parent table and child table(s) to make it bold then right click on Edit Relationship. Check the Cascading Delete check box. Now when you delete a record from the parent table all child records will be deleted too.
ang in there, as you will get this working!
hth,
Jack
rondata
k, I see where you are at, but first off, the box is greyed out. I can check the Enforce Referential Integrity box, and that will allow the others to be checked but when I do this I get an error saying that I am violating the ref integrity rules shrug.gif
Thank you for your help!
Jack Cowley
You do have to have Referential Integrity checked before you can check the other check boxes. You cannot check Referential Integrity because your tables have data and RI was not checked. If your data is all test data then you can delete the data in the tables, check RI and the other check boxes and then go back to testing your db. You may be able to delete some of the child records and then be able to check RI, but I suspect that the data may not be valid. If your data is 'live' then you may have to create a backup, delete the data, update the joins then copy and paste the data from your existing db into the new one.
It isn't ever easy, is it?
Jack
rondata
AH HA.. okay, I saved all the data and I am going to copy it back in. Is it important to cascade update relating fields as well?? what would be the benefit (if any) to that?
THANK YOU SO MUCH!! I am so gonna hound you until I finish this.. hahah frown.gif
Jack Cowley
The Cascade Updates are not as important but check them anyway as it will not hurt.
You are very welcome and 'hound' away!
Jack
PS. You should be able to paste the parent data back in easily enough, but the child tables may complain once in a while and you will have to find the problem in the record and fix it... GOOD LUCK!
rondata
UGH.. okay, so I tried to copy the data back to the tables, but it's numbering them starting with 30 or something!! is there a way to start from the beginning? :shurg:
Jack Cowley
If you are talking about the Autonumber fields there is a way, though the number should have no meaning whatsoever to you or your users, only to Access... Having said that - Remove the data so the tables are empty. Do a Compact and Repair. Now add your data back in and the autonumber primary keys will once again start at 1...
Keep smiling frown.gif as you are making lots of progress and learning lots thumbup.gif
Jack
rondata
Yes I am thanks to yoU!!!
figure screw it frown.gif It's only numbers that don't matter laugh.gif Okay, I think I am just about good to go with this, but I won't be gone long.. this is a great place to gain knowledge even if you are not working on a project that needs to be done and is all messed up!
hah..
Thnak you SO MUCH!!
P.s. What is the .ldb file for and is it important? frown.gif tia!
Jack Cowley
The .ldb file - "The .ldb file plays an important role in the multiuser scheme of the Microsoft Jet database engine version 4.0. The .ldb file is used to determine which records are locked in a shared database and by whom."
I am glad you figured screw it with the numbers, but sometimes it is hard to do because programmers always want things neat and tidy!
I'm glad that we have been able to help and if you have more questions you know where to come for answers and maybe a giggle or two...
Jack -o!
rondata
LOL.. the real programmers here can bite me cause they had no time to put together anything and this is a quick and dirty audit laugh.gif
Thanks for the info! Does that mean, for feedback purposes (everyone will get their own copy of the form to give feedback on it) that I don't need it? frown.gif
TIA
If you ever make it down to Pasadena, I owe you lunch!
Jack Cowley
PASADENA, California? I was born and raised in Altadena!!
don't understand your question about 'feedback'. If you are going to deploy the db to a lot of uses in your company then you would split the db, put the backend on the server and a copy of the front end on each users machine. Does that answer the question or just confuse the issue?
Ah, Pasadena, a town that I am sure I would not reconize anymore with all the building going on... I remember when Pasadena had streetcars!!! My oh my oh my...
Jack
rondata
I need a team of auditors to TEST the form before it's deployed for the audit. frown.gif
Pasadena has changed so much.. "oldtown" west colorado blvd is all neon these days.. :sigh:
Jack Cowley
Hmm. If you need the form tested then you should give a copy of the db to as many as possible and let them test until they drop....
remember when the building on the north west corner of Fair Oaks and Colorado was a very scary bar and that you NEVER went anywhere near that part of town after 6pm... I remember when the Colorado Street Bridge didn't have any fencing... Those were the good old days...
Jack
rondata
hahah.. oh yeah! Suicide bridge!! fenced now.. The "thirty-five" is now the hippest bar in pasadena! :lol:
Jack Cowley
Is the 'Thirty Five' the bar that used to be that scuzzy, creepy, raunchy, filthy bar on the north west corner of Fair Oaks and Colorado? Nah, it can't be as that is where the street numbering starts so 35 has to be either east or west of Fair Oaks... Yep, Suicide Bridge... They just let 'em jump in those days...

Otold you this was a fun place to get your Access questions answered...

Jack
Edited by: Jack Cowley on Wed Apr 26 18:04:37 EDT 2006.
rondata
Yes 35er bar USE to be the at scuzzy, creepy, raunchy, filthy bar on the north west corner of Fair Oaks and Colorado!
How it's hip bar that everyone hangs out in! Pasadena "Old Town" has CHANGED..
the whole darn town in NEON these days!!!
HAHAH
Jack Cowley
Oh my stars! I had no idea that the 35er went from horrible to The Place To Be...Yep, the times they have changed... I am sure I would not like the 'new Pasadena' as much as I liked the old.. When Nash's was an important department store and nobody had ever thought to build on Lake south of Colorado....
rondata
This place is so built up now it's insane.. looks like a smaller version of LA with all the high rises!!!
Well, I gotta run. I want to thank you again for ALL your help!!!
I'll be back again, I am sure!!! frown.gif
Jack Cowley
You are very welcome and I am glad were were able to help.
hate high rises so I think I will stay up here, near the wine country, and spend my days rocking on my front porch...
Jack
rondata
Hey, if you have a minute I have one more question laugh.gif
I have the combo box at the top of a locate page where you can pull down the record and the page populates. Problem is, it's confusing because the minute you hit search, it's already populated with data (except the combo box).. is there any way to have the form completely blank when you go onto it and only populate after you pull down (or type in) the desired record?
TIA!! !
Jack Cowley
Ronda -
enerally when a form opens it is already populated with the first record in the table and then when you make a selection from the combo box that record is selected. The next time you go to make a selection from the combo box the previous record selected is showing so the only time a form could possibly be 'empty' is the first time you open it. I would just go with the flow on this one as I don't see any real advantage for clearing the form then selecting a record.
Hope that made sense...
Jack
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.