im drowning in access please help me! (1 Viewer)

D

DrRocket

Guest
allright, im gonna be completely honest, i have no clue what im doing and i really need some help. For my work, i have to create a form in which people type in different things in different boxes and then when they hit the command button i need it to send and save everything into an excel worksheet without bringing up the worksheet and then i need it to save all of the information into an access table without bringing up the access table and then i need all of the information to disappear so that whoever is using the form can type in information again without having to erase all of the information they typed in before is this possible? if there is a kind soul out there who reads this and takes mercy on me and shows me how this is done, then i will be in eternal gatitude to you and i thank you with everything i got. tttttttttthhhhhhhhhaaaaaaaannnnnnkkkkkkkkk yyyyyyyoooooooooouuuuuuuuu!!!!!!!!
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 19:48
Joined
Feb 19, 2002
Messages
43,302
The whole process will be much simpler if you use a bound form. To bind the current form, change its controlsource to a table or query. Then change the controlsource of each of the controls to a column from the form's recordsource. This would have been done automatically for you if you had bound the form before you started adding the controls.

Once the form is bound, Access will take care of the mechanics of add/change/delete. You'll need to add any application imposed constraints that you can't define as validation rules in the tables.

To export the data to a spreadsheet, you would use the TransferSpreadsheet Action. Create a macro to do this for you (I only recommend a macro here because the button wizard does not support this export directly. You can convert the macro to code after it is all working). You can add a button to the form (make sure the wizards are turned on so the wizard will walk you through the process) to do the export by running the macro you just built. After the wizard builds the export for you, you will need to modify the code to add the command to save the current record in front of the code that exports the data.

DoCmd.RunCommand acSaveRecord
 

Users who are viewing this thread

Top Bottom