Record Macro?

Mar 15, 2005

Hi,

I have been told that there used to be an option to record a macro in access '97 so that it would record your steps and then this can be saved as a macro and run when needed.

I need to be able to have relationships automatically added between three tables and thought the best way would be to use this record macro option. It doesnt seem to be part of Access now..

does any one know anything about this.. or how I could get Access to assign relationships to the tables automatically?

Thanks
-x-

View Replies


ADVERTISEMENT

How To Add A New Record In A Table By Code Or Macro?

Nov 8, 2007

I have a simple table of Customer names. It's as simple as two fields involved:

CustomerID
CustomerName

How can I use VBA code or macro to add a new record to this table? I'm a newbie, so if possible, please provide a few lines of example codes. Thanks.

View 6 Replies View Related

Run A Macro On Change Of Record On A Form

Feb 23, 2008

Hi!
Is it possible to run a Macro each time the user changes the Record on the Form? If so how? :confused:

View 2 Replies View Related

Open Form To New Record With Macro

Dec 21, 2006

I really hate being stupid about this, but I'm running around in a circle and it's making me dizzy. All I want is a simple macro that opens a form (with a subform) at a new record from a button. I know I am missing something obvious so I will let others see if they can find out what has gone wrong. The current macro is:

OpenForm(FormName)..View(Form)..DataMode(Add)
GoToRecord .. ObjectType(Form) .. ObjectName(FormName) .. Record(New)

On the property sheet of the form the following are all set to yes:
Allow Filters, Allow Edits, Allow Deletions, Allow Additions, Data Entry (I suspect the problem is here)
Record Locks is set to No Locks.

When I open the form from the button, it looks right, and I can enter the transaction information, but when I try to enter the subform information or save it , I get "The Microsoft Jet database engine cannot find a record in the table 'NewContacts_tbl' with key matching field(s) 'ContactID'". I get the same message with Allow Data Entry set to no.

And yes the key field IS there, in spite of what the Microsoft Jet database says.

I hope everyone gets a chance to enjoy the holidays and thanks to all of you for your past help and my current (relative) sanity.

A2K
:(

View 3 Replies View Related

Macro Help Displaying One Selected Record

Nov 8, 2004

I am trying to create a table of help messages and display them help in a form. Using MSAccess.

Each Form used will have a help button, that runs a macro "mcrHelp.xxxxx". This macro should select the relevant record from the table to display in the "Help Form".

But i am having problems selecting the records.

Ex.
Macro name: mcrHelp.Help1
Table name: tblHelp
Fields: HelpId HelpTitle Description1 Description2
Data: 1 Help1 Sentence 1 Sentence 2

Form to display help in: frmHelpScreen

I want mcrHelp.Help1 to select the Help1 record from tblHelp and display Sentence 1 and Sentence 2 in the form frmHelpScreen.

Each time i try the macro i have i get the first record displayed in the form.

Many thanks

View 1 Replies View Related

Subform Name Path - New Record Macro

Mar 2, 2005

I've got a form with a subform on it that has a subform on it (nested subforms - Customers form with computers subform, which has a software licenses subform on it)

I'm trying to put a button on the top-level customers form that will jump to a new record in the software license subform-subform (the licenses form is displayed as continuous with a blank at the end for new license entry). I want to set the OnClick action to move the record selector on the software licenses subform to the last (new) record in the continuous form display. I can't figure out the appropriate path to use as the Form Name in my GotoRecord macro.

Is there a special trick to use when referencing subform controls?

Slaughter
slaughter at mizzou dot edu

View 2 Replies View Related

Repeating Macro Needs To Stop After Last Record

Nov 1, 2006

I am basically setting up a macro that will change the value for a field from "N" to "Y" for all records from a query. The macro works fine except for it does not know when to stop and gives an error message of "You can't assign a value to this object" after it has gone through all of the records and there are none left to change. The macro is set up like this:

OpenForm Action : This form is populated by the query and I set the Where condition to open records that don't already have a value of "Y".

SetValue Action : I use this to set the value of the field to "Y"

Close Action : I use this to close the form and save the changes

RunMacro Action : This is where the problem is. I use this to repeat the macro so it can go through the rest of the records that still have the field set to "N". I need to set the Condition or Repeat Expression so that it checks if all of the records have been changed. It either needs to check that all records have the field = "Y" or check that the macro is on the last record. Basically something that will cause the macro to not open itself again when there are no more records to be changed.

View 2 Replies View Related

Macro Or VBA For Opening A Form In Particular Record

Jan 30, 2013

Self tought in Access07 but I'm trying to do the following:

I've got a form (Clients_F) that has a subform in datasheet view with a list of quote numbers made by each customer, I have managed to make a Macro after a few hours and googling, that opens another form (Quotes_F) so that it can be edited when a quote number is clicked, but I wish to be able to open Quotes_F as a new record when the empty field under the numbers column in the list is clicked.

Also want to know if it's possible to mantain the Customer's details pre-filled?...I am guessing that this is done through the CustomerID(PK & FK)?

View 9 Replies View Related

Stop Macro On Last Record In Form

Dec 4, 2012

I have a macro that opens up a form called SLA Complete Form - The macro then goes and examines two fields on the form to see if they contain data and if they do not then it displays a popup box with a message.

The form that gets opened up can have anywhere from one record to approximately a hundred records.

How can I get the macro to stop running when it hits the last record on the form without displaying an error message. I am currently using the next record feature in the macro.

View 1 Replies View Related

How To Use Macro To Go To Next Record In A Form With One To Many Relationship

Dec 6, 2012

I used the Control Wizard to create a macro on a command button to do record navigation i.e. go to First, Next, Previous and last record. The macro code, in the macro editor, is inserted on a command button on the form, asks whether it is a table, query form etc. I chose form and entered the form name but the error says the form needs to be open before I can run the macro. This happens when I open the form from a Navigation Control and Click the button containing the Macro code on the form.

View 1 Replies View Related

Making Last Record Appear In Macro Button

Apr 14, 2014

I have created a button with Macro located on form in record. It does what I want except I want it to display only last record. Currently it is displays first record and I have to scroll. See attached photo of what I have. Access 2010

View 2 Replies View Related

Macro To Open Table To A Specific Record

Dec 8, 2014

I'm very new to access database and I'm trying to create a macro that allows the user to enter data after seeing a mistake in a form. I need a macro that will open the specific table and record of a piece of data. For example there is a student TestName3 whose grade on a competency is 30% but should really be 45%. I want a macro by the competency percentage to allow the teacher to edit that without looking through the entire table. The macro should prompt first to ask if the teacher is sure they would like to edit, second prompt asking for the student's unique ID number, and finally be taken to the specific record and table related to that competency.

I have tried to use a vastly overcomplicated DLookup and Order column to give me the value for a acGoTo search.

Here's what I have.

Option Compare Database

Dim answer As String
Dim response As Object
Dim gotoresponse As Object

Private Sub Command71_Click()
On Error GoTo Command71_Click_Err

[Code] ......

View 5 Replies View Related

Using OpenForm Macro To Open A Subform To A Specific Record

Aug 24, 2006

Hello, fantastic site you have here!

I have a form based on a table called TermWithPaysStoredData that shows a single row for everyone in the table with a small amount of info from the table and has controls for a user to enter dates which writes to that same table.

I have a subform that reads that same table but has much more information about each row. I would like to add a button to each row of the main form that says "More Info". When clicked, it should open the subform to the same employee.

The field I want to match is called ID. My main form is called fTermWithPays and my subform is called fTermWithPaysMoreInformation.

I tried using the OpenForm method but that either opens the form to the first record or filters and shows only one blank record.

I'd like to use a macro for this if possible because I don't know VB.

Any ideas? Let me know if more explanation is needed.

Thanks very much!

View 2 Replies View Related

Queries :: Reset A Query Or Macro When Open A New Record?

Oct 15, 2013

Is there anyway to reset a query or macro when you open a new record? My database seems to be holding on to data from the previous record. The data is gained from two queries and one macro.

View 1 Replies View Related

Forms :: Combo Box Record Selector AfterUpdate Macro

Jun 18, 2015

I have a form that has a Combo box record selector which works fine. I need to add more to the Where condition of this macro.

Combo1 - Options 1-Facility, 2-Physician (referral_type)

Combo2 - Record selector that works, either shows a list of facilities or list of physicians.
Macro SearchForRecord - Where Condition ="[fac_id] = " & Str(Nz([Screen].[ActiveControl].[Column](0),0))

Would like it to be

="[fac_id] = " & Str(Nz([Screen].[ActiveControl].[Column](0),0)) AND [referral_type] = Me!Combo2

Have tried a few different things with no luck.

View 5 Replies View Related

Repeat Macro Until Record Count Of Query Equals To 0

Aug 9, 2012

I have a macro that needs to run repeatedly until the number of records in a query =0 but I can't seem to get the Repeat Expression set properly.

My query is called sqMatchCount:

SELECT Count(sqCompare_Parts_Matched_1st.BRP_Entry_Num) AS MatchCount
FROM sqCompare_Parts_Matched_1st;

The theory is if I don't have any more matches then I do not want the macro to run any more. In other words, MatchCount will = 0 when there are no more matches.

I have tried a variety of syntax using DCount in the Repeat Expression:

=DCount("*","sqMatchCount") ...... Macro runs in a continuous loop
DCount("*","sqMatchCount")=0 ...... Macro does not run (although I thought a couple times it actually DID run with this syntax)
DCount("MatchCount","sqMatchCount")=0 ...... Macro does not run
=DCount("MatchCount","sqMatchCount")=0 ....... Macro does not run
=DCount("MatchCount","sqMatchCount") ....... Macro runs in a continuous loop

What IS the proper way to write this Repeat Expression for the RunMacro Action if I want it to run as long as sqMatchCount.MatchCount>0?

View 14 Replies View Related

Wrong Record Selected From Macro Of Open Form Button

May 1, 2012

I have a parent form showing some of the contents of a single record in a parent table. This form contains a button that opens a specific subform (using an IF statement based on the contents of another field in the parent table/form. There are actually any of 8 child forms/tables that could be selected and the related record is in only one of them. The relation between the tables is based on the PK of the parent table and the related FK in the child table. and the data is correct in all tables.

My problem is that when I run this button on the parent form/table it returns the appropriate form/table, but displays the first record rather than the related record. In the past (using this same process) I have been successful in getting to the right record by fiddling with the where statement (sometimes putting in a equal sign or taking it out fixes the problem). However, no matter what I do to the Where statement nothing works. I have not yet placed the final else condition for where the form selection field (VMValIdentType] is empty yet as there is no point at this time.

Here are the button macro contents:

If [VMValIdentType] = "Software"
OpenForm
Form Name: tmpVMValSW
View: Form
Filter Name:

[code]...

View 7 Replies View Related

Modules & VBA :: Write A More Complex Macro That Will Start Another Macro At Preset Time

Dec 8, 2013

I am trying to write a more complex macro that will start another macro at a preset time, however I am getting stopped at the first hurdle - getting a macro to run another macro.

Here is the code i am using at the moment, all I want to do currently is click the first button, then get the second macro to execute. But no luck, getting error 2157 "cannot find the procedure"

Code:
Private Sub Command3_Click()
MsgBox "1st macro running", vbExclamation, "Note"
Application.Run "teststart1"
' Application.OnTime TimeValue("19:55:00"), "teststart1"

[code]....

View 1 Replies View Related

Queries :: Press A Button And Run A Macro / Append Query To Add A Single Summary Record To Another Table

Aug 2, 2013

I have a query run that gives me a list of records that I view on a continuos form. What I want is to press a button and run a macro/Append Query to add a Single Summary record to another table.

For example my query spits out this data

Part # Quantity Serial Number
GO2 1 123
GO2 2 456
GO2 2 789

What I'm looking to get is

Part Number Total Quantity Serial Number 1 Serial Number 2 ..
GO2 5 123 456

I'm stuck on a couple of things.

1. Getting a new single row to append.
2. Getting Serial Numbers from several records to save on to a single record.

View 4 Replies View Related

Run A Macro On First Use.

Dec 5, 2005

Hi.
I have a macro (that runs a bat file) that I would like to run for the first time ,and only the first time that a form is run. The bat file will then copy over certain files the db needs.
Is this possible?

Thanks.

Frank.

View 1 Replies View Related

Macro

May 19, 2005

I have a database and in order to get the correct values you need to run a few queries/make tables/delete tables ect. I was wondering if there was a way to code something so that on command click button it would run through all the neccessary steps so people dont have to manually do this.

View 1 Replies View Related

Do I Need A Macro For This? If So, How?

Mar 31, 2006

Hi,

Here's a sample of the database that I'm working on. I'm trying to help teachers take attendance of all of their students and so have the following tables.

tblAdmin - List of Teachers and their IDs
tblAttendance - Courses, Student IDs, the Date and the Status (tardy, etc..)
tblCourseInfo - List of Courses and the Teachers teaching the course
tblEnrollment - List of the Courses and the students enrolled in them
tblStudents - Student IDs and their names

The form that I want is a "Course Information Form" that will

(1) Display all the students enrolled in their course
(2) Allow the teachers to take attendance everyday while keeping all the previous records

I've attached my sample database. I really appreciate ANY help any of you can suggest.

Thanks :)

View 13 Replies View Related

Macro

Feb 27, 2006

I am running a Macro that is running 3 query and saving inbetween each query.
My issue is that when the macro runs I have to hit ok when the message boxes pop up saying "its about the run a Query" and then again when it says "your about to update the records". These two messages occur for each query and save. So I have to hit OK 6 times

Is there a way I can set the macro to NOT show these message boxes?

THanks in Advance

View 9 Replies View Related

Macro Problem

May 2, 2006

Hi all,

I usually search for the answers to my problems, but as im not sure what the problem is i havnt been able to do so here.

Basically i have a pretty simple database, it works fine in the UK. The company i have designed it for are moving to Budapest, i have just had an email this morning saying an error message pops up when the try using a form, i have attached the message. The macro just runs a query based on a table in the database asking the users to choose a record number edit. Im assuming it must be something to do with is being used in Budapest as it works fine here, but they are accessing it the same as they would do here, just from a different location.

Any help would be appreciated, thanks

View 5 Replies View Related

Autokeys Macro

Dec 2, 2006

I use an autokeys macro to allow users to openforms with a hotkey directly without going through the menu system.

I would like the users to be able to modify their own setttings for this, but I could not find a way of writing to the macro autokey table.

Anyone know of a way?

View 4 Replies View Related

The Macro Can Not Run In Some Computers

Jul 30, 2007

I have a program thats work perfectly in some computers useing the network but when i try to open it in other computers i get an error and when i try to debug the error it highlit the line that i am calling the micro that open the mainform in it, i hope some one have an idea for what is going on with the program

View 12 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved