Microsoft access macro
Microsoft access macro
(OP)
Hey Guys,
Hoping for some help creating a macro in Access.
From what I can tell a macro is created using VB, for which I have no clue as to how this works. Here's what im trying to do. I want to run a query, then add a column to the query. I want run a macro that will look at what I type into the first field of the column and then copy it to all the fields underneath it, the macro should stop pasting when there are no more records to update. In other words If there are 50 records it should stop at 50. Any Ideas?
Thanks, Tom
Hoping for some help creating a macro in Access.
From what I can tell a macro is created using VB, for which I have no clue as to how this works. Here's what im trying to do. I want to run a query, then add a column to the query. I want run a macro that will look at what I type into the first field of the column and then copy it to all the fields underneath it, the macro should stop pasting when there are no more records to update. In other words If there are 50 records it should stop at 50. Any Ideas?
Thanks, Tom





RE: Microsoft access macro
UPDATE Contacts SET Contacts.Department = [New Dept];
will open a dialog box with the question New Dept and then fill in the Department column with the value you type in.
Good Luck
johnwm
________________________________________________________
To get the best from these forums read FAQ731-376 before posting
UK steam enthusiasts: www.essexsteam.co.uk
RE: Microsoft access macro
Thanks, the update query works great for this application.
I am curious though about how to run macros in Access.
Do you know of a good reference?
Thanks, Tom
RE: Microsoft access macro
To do this with a form, open a form in design view , go to the file menu and save the form as something not already in your database, then go to one of the text boxes or other controls on the form and right click, select properties, events tab, onclick, click the arrow. If you already have a macro in your database the macro should be there. Select it. If not click the ... to the right and choose "macro builder".
DO THIS ON A COPY of an mdb file. Not on the real one.
Hope this helps
Gerald Austin
Iuka, Mississippi
http://www.weldinginspectionsvcs.com