Creating a command button to edit a record
Thank you for taking the time to report an issue.
What's wrong... Please write below.
For save or delete the message is "the command or action 'save record' isn't available now". In the property on a form the data entry in data is yes. I'm trying to add a VBA in event on open but its not working as well.
My idea is that the button will function as a kind of “toggle button” between modes.
The original macro linked to the command button is named “record edit” and the macro I wish to link to the command button is named “on close”.
However, whenever I run the macro, though the caption and color changes take place, I receive the error:-
“The object doesn't’t contain the Automation object ‘on close’”
Here is the macro "record edit":-
Can this be done? If so, how can this be done? Would you have any sample code to attach to the editing button, to do this interesting problem.
Within this application I have an Access 2007 form that has a Command Button. I'm not sure how this Command Button was created (Macro, Query, etc.) but I do know what it does. I would like to edit the Query/Macro this Command Button executes.
Can you pleae let me know how I can edit the Command Button's Query/Macro.
I originally had a delete button macro created by the command button wizard and it seemed to be functioning properly. from the form it would ask if you want to delete the record permanently. If I chose yes, it would appear to delete it, meaning that if I were to search for the record to verify it would say that the record does not exist. Upon closing the form and viewing the table, the record would not actually be deleted and would then be back on the form when I would reopen it.
So, I browsed through the discussion board and found a suggestion on a couple of posts and tried that as well creating the delete button in the code builder using the following code:
Basicly I have a sub I want to call before the new record command is activated. Ideally I would give the user a button I create that runs the sub, and if the fields are as I want them, then it would allow the new record to load. However if not, it would give a message and cancel the command.
Or if there a way to tell if the new record button is hit BEFORE the command is executed, that would work
What I want to do is have the user select a record from the combo box, which then populates the textboxes (I've already managed to do this). Once the data has loaded into the textboxes, Iwant the user to be able to edit the info in the textboxes, then press the command button so that it updates that record in the table.
I created a Form to display the record details of a Query. I have four command buttons (First Record, Next Record, Prev Record, Last Record) to scroll through the records. The problem is when the EOF is reached and the user clicks the Next Record button a blank record appears and if they click the Next Record button a second time the program goes into Debug. And so my questions are
1. How can I detect the EOF condition?
2. How can I disable (or hide) the Next Record command button so it wont go into Debug if it is clicked again