Vba subform recordsource not updating
When doing the same on the form I have created manually, this code refuses to run. Hi there missinglinq Right now I am propably going to sound extremely dumb, but I am not sure to look where it falls over, as all the code I have done for this page so far works fine.The only addition to the code I have made to try and empty all the controls on it is the code I pasted in my last post. I have found some fragmented information on the web, but nothing to help me out. Hi there MSeda and vkong85 Thank you both for your replies. Once the user has completed and saved the first entry and want to create a new one, I would want them to click on a button that says " New Entry" or something, which then clears all populated form controls ready for a new antry. Simply choose the control button option from the toolbox when in design mode for the form and access will walk you through the rest and write the VBA code for you! Thanks something that's really simple is to just place a control button into the form.MSeda, I think the code and everything for the form will be too much to post here.vkong85, I have tried Access's Add New Record button, but it does not work.
Go To Record , , ac New Rec didn't work, but it really should! If you place it behind a button it will go to a new record, saving the record just entered at the same time. Right here is the code for the New Rocrd Button : Private Sub Command13_Click() On Error Go To Err_Command13_Click Do Cmd.When I do run this, nothing happens, no error or nothing.Go To Record , , ac New Rec Exit_Command13_Click: Exit Sub Err_Command13_Click: Msg Box Err.Description Resume Exit_Command13_Click End Sub I have placed this button on a form which I let Access create automatically and it does waht it is supposed to, which is clear all populated fields on the form.
The form itself have 34 fields and there is quite a lot of code behind it.Surely there must be some code that empties all controls on a form regardless of your code?