Create a new record using a macro?
On the employee table Clock # is the primary key and cannot be duplicated. What I want to do is create a new expense report for each new employee (a dummy record to populate a zero value for each category of expense type).
So when I enter the employee and save the record it would automatically create a record with all the specified values, only changing the clock # (as input on the employee form).
I don't want to build the default values because each employee may have multiple expense reports with different expense types.
My thought would be to copy the entries in say "record 4" (autonumber field), only changing the clock # as input on the employee form.
Thank you for taking the time to report an issue.
What's wrong... Please write below.
I want to create a button in "Employees" form and press it, so that "Employee Badge" form opens displaying only the record that was on the "Employees" form at the time I pressed the button.
I have created a macro to do this. The "Action" of this macro is "OpenForm".
Can someone please tell me what I need to put in the "Where Condition" of the macro?
Or is that "something" entered in "Filter Name" of the macro?
For example, there may be multiple instructors involved in training a particular course, and they should be able to locate a scheduled course in the database and when they view the record in a form, click a button or check a box that will trigger a macro that creates a duplicate of the current record.
There is probably a better way for me to explain this, but if you can help me with the SQL string or macro to accomplish this,
In this article
* Before you begin
* Step 1: Add timestamp fields to a table
* Step 2: Create a macro that records the date and time
* Step 3: Add the macro to a data-entry form
As a new record may have been added it is physically out of alphabetical sequence, even though a sort will show a table in alphabetical order. I suspect the command "next record" in the macro is the problem.
This Macro runs against a Form that has a SubFrom (MainForm named "Expense ID" & SubForm, "Expense"). Macro is initiated by pressing a button.
I would like help with some VBA code showing how to perform the following:
1. Evaluate a field ("Activity") in the first record of Subform ("Expense") against condition "Is not Null".
2. If condition is true, set value of another field ("Post") in the same SubForm record to "1".
3. Move to next record and repeat steps 1 & 2 until all Subform records are evaluated.
4. Return to macro that initiated the VBA script to perform the next action in the macro.
The open form exists as part of the button creation as a macro.
in the macro am going to insert a record at top to set up this conditional.or add the conditional column ? not sure how this is done in the macro world.
How can I add another macro to add record to table and the clear it off the list boxes or fileds ?
Object Type, Object Name, Output Format, Subject, Message Text, etc.
Is it possible somehow to modify this macro to include the current record number or another field? So the email recipients wouldn't have to open up the .pdf? For example, the message text of the
email would include "09012A0000". Or, the .pdf attachment would be the name of the record?