Interface/Control Help

  • Thread starter Thread starter xCepheus
  • Start date Start date
X

xCepheus

Guest
Hello, let me preface this by saying I'm pretty new in working with and designing Access databases. I am currently working on designing an Access database and I have a form that adds records to a table however I am not satisfied with the default behavior/interface that Access provides for adding a new record via a form. What I would like is to have 2 command buttons: an "Add" button and a "Close" button. The "Add" button should save the data entered in the fields to the source table and put the form back into it's original state with all of the fields set to null or default value and ready for the next record to be input. The "Close" button should close the form and undo the current record if any data has been entered by the user. I have searched the forums and the brief FAQ but have not seen a solution to this specific problem. I have tried using the command button design wizard and also VBA to get the buttons to work properly but so far the solution escapes me. I'm sorry if this has already been asked and answered before. Any tips would be most appreciated. Thanks.
 
Post a sample DB

If you post a sample Database I would be glad to add the buttons for you and tell how I did it. Just attach a zip file with the database in it to your reply. -livin4rocknroll
 
Is the explanation really that complicated? Don't you think you could just post the steps? I don't think I'll have a problem following your instructions... and on top of that I'm more of a tactile learner... I need to get my hands dirty a bit for it to really sink in. ;)
 
Well I got it to work but I'm not sure what happened. I got frustrated and just decided to recreate the form from scratch. I added the buttons as I described them and added some VBA to the "Close" button so that it can close both on a blank form and after data had been entered into the form and it worked. I must have changed some setting on the old form that was causing the VBA code not to work properly when called. Does anyone have an idea on what might cause that so I can look to avoid doing whatever it was that I did in the future?
 

Users who are viewing this thread

Back
Top Bottom