Forms :: Open A Form For Adding Child Record Related To Highlighted Record In Subform

Oct 2, 2013

Is it possible to open a form to add a child record related to the highlighted record in the subform?

View Replies


ADVERTISEMENT

Forms :: Requery 2nd Subform When Different Record Highlighted On First Subform

Sep 3, 2013

I have two sub forms on a main form.Subform 1 displays information which comes from a query, filtered using two combo boxes on the same form.The active record on the data sheet has two field values output to hidden text boxes on the form.

These text boxes then provide the values used for the query displayed on the 2nd sub form.When I highlight a new record in subform 1, the text box values change, but the values in sub form 2 do no.Which would be the best method to use to get this to requery?

View 10 Replies View Related

Forms :: Link To Open Form With Certain Record Related To Individual In Query

Dec 5, 2013

I created a query that shows everyone who has a specific date field blank. Now want to make those names clickable so that it opens a specific form with a certain record related to that individual in the query. Each line with a different individual should open a different person on the form and their corresponding record.

View 3 Replies View Related

Modules & VBA :: Adding New Record To Related Table In SubForm

May 13, 2015

I am currently working on an Access Database that houses our security clearance information. Most of the system is up and running but the most recent form has got me spinning my wheels. I have a Word User Form that users will download and complete, once completed the macros will automatically send us the document to be added to our database. Most of this is working the problem is that this portion of the database has multiple related tables and at any given time a user may require multiple records in the related tables. I have created the code to copy most of the information but am getting stuck adding a new record on the sub-form when multiple items are required. Here is a breakdown of the scenario

Word Doc Table 1 = Basic Organization Info
Word Doc Table 2+ = Sites to Visit (There could be more than 1 table added here)
Word Doc Table 3+ = People to go on site (this might not be the third table based on user interaction for sites)

So far I can get Table 1 and Table 2 data but if there are more than 1 site I cant seem to get the system to create a new record on the related table it is creating a new record on the main form. Here are the lines I used to try to create the related record..

Me.RFV___Agencies1.SetFocus
DoCmd.GoToRecord , , acNewRec

When I put just the above code on a button it seems to have worked as the sub-form showed an additional record was created but when using this on my macro the sub-form is not taking the focus for some reason.

View 1 Replies View Related

Forms :: Selecting Record In Parent Subform From Child Continuous Subform

Jan 26, 2014

I have two subforms on a main form. Both use similar queries and nearly the same set of records and PK. The first subform is for data entry and the 2nd subform is a continuous form that lists the entries in order that are made from the 1st Subform. (for entering in vacation days and appointments)

The continuous form cannot be edited, it is to be a list for viewing the information only.

I have an edit button next to each record on the continuous form. When the button is clicked, I want it to take the 1st subform to that specific record as well (same PK), so the information can be edited there.

I cannot figure out how to get the 1st subform to go to the record on the continuous form when the button next to that record is clicked on the continuous form.

I tried the DoCmdSearch for record and just keep getting object is not open errors.

View 2 Replies View Related

Open Record In Main Form By Clicking Record ID In Subform

Dec 16, 2014

I am creating an events database. In my main form, I have all the details of a single event (billing code, fees, customer, support personnel, etc.). Then, I have a subform (form view) that lists each of the other services which share an event ID (this ID comes from a separate, unrelated events management suite). In the subform, I display the most-commonly-edited fields so that they are editable without navigating to a different record.

However, there will be instances where it becomes necessary to navigate to one of the records listed in the subform. I would like to make this a quick process by just clicking on the primary key in the subform, and have the corresponding record appear in the main form.

In my searches I've found a common suggestion to use a DoCmd.OpenForm method where the form opens to that specific record -- in effect filtering by the primary key number. I don't prefer this method because it disables the ability to navigate to other records using the previous, next, find records, (etc.) buttons without closing and re-opening the form.

Is there a way to make the main form 'jump' to a specific record by clicking on a control in the subform, without limiting the ability to navigate in the main form?

View 10 Replies View Related

Forms :: Clicking A Record On A Datasheet Form To Open Record In A Pop-up

Apr 23, 2013

I have a form "IntUnderwriterSearchByName" which is based on the query "Search by Name". This form opens with a parameter (please enter name of broker) and is set out like a datasheet with the following fields- "Broker Name", "Domicile", "Broker Code" and a couple of others. I'd like to be able to click on a record and open the form "IntUnderwriterPopUp" so that the details of that specified record are displayed.

Broker Code is what I'd like the form to look for and this Broker Code is unique for every one of the 900 or so records. This code can be numerical e.g. 01233 but also can be a mixture of both e.g. EU2885. It is also worth noting that this code is not the primary key- i have an autonumber (called ID) that does this- but this field does not appear on the form.

View 7 Replies View Related

Forms :: Adding New Record To Subform?

Jul 4, 2013

I have a form with a subform (in continuous) I have on the main form a few unbound text boxes which once im happy with the results i press a command button on mainform which adds the unbound text boxes to a new record on subform im struggling with this one. I have done similar before but that was with the unbound text boxes in header of the actual form i was adding record too.

View 3 Replies View Related

Forms :: Subform Needs To Open On First Record

Jul 27, 2015

I have a series of combo boxes on subforms whose control sources are fields in a table that has a many-to-one relationship to the main case-information table meaning that there will likely be several records for any case. I need each combo box to open onto the first record for each case rather than create a new record. I've seen code that does this, but under somewhat different conditions, and my VBA skills are too rudimentary for me to be able to adapt the code to my needs.

View 7 Replies View Related

Forms :: Cannot Add Or Change A Record Because A Related Record Is In Table

Feb 22, 2015

I have created three tables, all of them are connected by one-to-one relationship by same field, as you can see in the screenshot. and at the same time I have created three forms for each table. then I brought two forms in one remaining form. so whenever I entered data in first form and click on the next tab in which another form exist, it gives me this error: "you cannot add or change a record because a related record is in table".

View 2 Replies View Related

Forms :: Main Form Jumps Back To 1st Record When Moving To Next Record In Subform?

Mar 24, 2015

When I add a record in the subform and then move to the next record whilst still in the subform, the main form jumps back to its first record? I then have to move back to the right record in the main form to update the next record in the subform.

I want to move to the next record in the subform without affecting the main form.

View 1 Replies View Related

Forms :: Form Data To New Record Related Table

Aug 19, 2013

I have a form based on a table which includes the mid field. I want to have a macro that takes the value of the current mid, and makes a new record in a 1-many related table (consisting of record id (auto), mid and trmntdate), paste the mid and insert the current date.For the life of me I cannot get it to work? The process should be something like:copy mid value, add new record to related table, paste value in mid, insert current date in trmntdate, save. I've tried append queries, experimented with copy etc, dabbled blindly with VBA and not got anywhere.

View 14 Replies View Related

Forms :: Runtime Error When Adding A New Record From A Subform?

May 12, 2014

I have a main form with several subforms in tabs. From one of the subforms I list linked records to the main form (Clients) within that subform (Bank account details). I list the records and have a button to add new records.

Where the Client has one or more records in the subform the add button works perfectly.

When the subform has no records the add new records button produces the following error "Run-time error '2498' An expression you entered is the wrong data type for one of the arguments"

The add button has

Private Sub Command52_Click()
DoCmd.OpenForm "AddClientBankDetailsFrm", acNormal, , , , acFormAdd, OpenArgs:=Me!ClientId
End Sub

the "AddClientBankDetailsFrm" popup form has

Private Sub Form_Load()
If IsNull(Me.OpenArgs) = False Then
MsgBox "Form was opened with ClientID = " & Me.OpenArgs
Me!ClientId = Me.OpenArgs
Else
MsgBox "No ClientID was passed."
End If
End Sub

ClientId is the primary key of the main form and the secondary key in the new record.

View 14 Replies View Related

Form/subform Adding New Record Problems.

Oct 27, 2005

Hey everyone, This seems like a great community for access - I'm glad I stumbled across here because I have some issues that need figured out.

I've searched the forum for answers and I have found a few posts with suggestions, but nothing has worked yet. (by the way, I'm fairly new to access, but not to databases in general).

So here's my problem, and I appreciate any help in advance.

- I have a main form and 2 subforms on the main form. The main form contains the information of thousands of Titles to different sections of land. The one subform then has multiple "requirements" per Title. So i have a many-1 relationship between the requirements and titles. On the main form, there is an edit button - so everything is locked until the user hits the edit button, and then the main form becomes editable. The requirements subform does not - it stays locked even though in my code I have "Me![Requirements Subform].Locked = False"

But this is not my main concern right now. What gets me is that I can not add a new record from the requirements subform. For example, Title 1 (T-0001) has 11 different requirements. I can use the navigation to browse through the requirements but I can not add a new requirement from the navigation buttons. This is a main concern.

Another main concern is that when I add a new Titles record from the navigation buttons, my requirements subform disappears from the form.

I hope I explained my situation clearly! if anyone needs any clearification, let me know.

Thanks again,
Brandon

View 5 Replies View Related

Forms :: Split Database - Opening Related Record On Different Form

Aug 11, 2014

I have a split DB that is in its (hopefully) finally stages of development. Using Access 2010. It is being developed both at work and at home on a 64 bit machine. The remainder of the machines are 32 bit.

All of a sudden one of my most basic sets of code doesn't want to work, but only on my machine at work. It works fine on my home computer and on other computers at work. It is the simplest of codes, run from frmNameA:

DoCmd.OpenForm "frmNameB", acNormal, , "[SequenceNumber] = " & Me![SequenceNumber], acFormEdit, acWindowNorm

The desired sequence of events is to open frmNameA, find the active clients and then click on the [SequenceNumber] to bring up the related record on frmNameB.

When I do this on my computer at work, it asks for the query criteria for the [SequenceNumber] and the criteria for another field. On the home computer and others at work, it works just fine.

In a related problem, I have the following code on the OnLoad event for frmNameB. It opens all the related records for active clients that are in frmNameB. But if there are no related records, it is supposed to cancel the event. Again, it works fine on my home computer and others at work, but not my work computer.

Private Sub Form_Open(Cancel As Integer)
'code when opened from frmNameA and no record exists in frmNameB
Dim MyReply
If ClientID = "" Or IsNull(ClientID) Then
MyReply = MsgBox("No record exits in frmNameB, Do You Want to Exit?", vbOKOnly)
If MyReply = vbOK Then
DoCmd.RunCommand acCmdUndo
DoCmd.Close acForm, "frmNameB", acSaveNo
End If
End If
End Sub

What I can't figure out is why this may be happening, where I might look for errors, and what I might do to correct this.

View 9 Replies View Related

Forms :: Adding New Record Line In A Subform After Pressing Add Button

Apr 9, 2014

How can I add a new line of record below a previous record after pressing the add button? I have attached a picture of my project.

View 3 Replies View Related

Forms :: Open A Subform And Display Last Bottom Record

Jun 27, 2014

I got a form / subform relationship.how to locate the bottom record, when the user after some queries input at the main form. I desire to display the bottom end record (EOF), instead of some sorting and display the last record at top of the subform!!

View 11 Replies View Related

Forms :: Getting Subform To Open To A New Record When Button Is Clicked

Mar 3, 2015

I have a subform [ctrlLogDetail] on a parent form [incidentdetails] that is opened by the user when they click on a button on a navigation form. These forms are used for a variety of purposes. The problem I'm having is that the user needs to be able to select an incident number and go to the appropriate form (I accomplish this by using this code: DoCmd.OpenForm "IncidentDetails", acNormal, , "Activity_ID = " & Me.cboINum in the on click event of the button.) This works appropriately. The subform is also appropriately linked to the parent form.

I need an additional line of code to have the subform go to a new record when the form opens to an existing incident number. Since I use this form/subform when doing different tasks, having the Docmd.RunCommand acCmdRecordsGoToNew in the Form on open event isn't optimal.

I only want the LogDetail subform to open to a new record when the user wants to add an entry, but not when they need to edit a specific entry. What is the appropriate syntax to use either in the openargs event of the openform command or elsewhere in the procedure so that the gotonew function on the subform only occurs when this button is clicked? I'm having difficulty getting access to understand that I want the subform to open to a new record but not the parent form.

View 1 Replies View Related

Open Form Not Adding Record And Use An Add Button On Form

Aug 2, 2006

I have a database with three tables

table 1 (form1)
reference (PK) auto number

table 2 (form2)
Reference (fK)
workbook reference (PK) auto number

Table 3 (sub form within in form2)
Reference (FK)
workbook reference (fK)
data Reference (pk) auto number

Each table is a form that is linked via the keys. On form 1 i have a button that is to open the form2, which it does but every time i open the form a new record is added. Why and how do i prevent this.

Then what i want to do is add a button for a new form on table 2 form but use the same reference as the record as presently displayed. How do i add new record using the same Reference but new workbook Reference?

Thanks is advance

View 1 Replies View Related

Open A Form And A Subform On A Specific Record

Mar 7, 2006

I am trying to open a single form with a single subform with a command button. I would like to open the form with the subform on a specific record but I am not entirely sure how to do this, I was wondering if someone had any advice that could help.

View 2 Replies View Related

Forms :: Double Click On A Row In Subform And Open Related Table Using Common ID

Jun 21, 2013

I want to Double-Click on a row of a subform to open a related table/form that are connected with a common ID. So far, I tried the following code, but it does not work.

Private Sub PackingSlipT_subform_DblClick(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "ProductT"
stLinkCriteria = "[PackingSlip_ID]=" & Me.PackingSlipT_subform.Column(1)
DoCmd.OpenForm stDocName, , , stLinkCriteria
End Sub

View 14 Replies View Related

Tables :: Add A New Child Record When Master Record Is Created?

Dec 21, 2012

I have a master table with about 40 fields. In addition, I created eight child tables with read only datasheet views of limited fields from the master table. The child table views are based on certain critera in the master table and are being refreshed by using delete and append queries tied to the On Current property of a form. By double-clicking a specific child record, a form is opened to allow editing of the master record. Also, I am using Referential Integrity and Cascade Update Related Fields to update the child table when a change is made to the master. However, I do not know how to add a record to one or more child tables when a record is added to the master table. The new child record would have to be based on the same critera that the append queries use so it gets added to the correct child table or tables.

View 5 Replies View Related

How To Add New Record From A Form To All Parent And Child Tables

Jul 27, 2015

I have one parent table with 6 child tables (all child tables are linked to the parent table in the relationship through the BoardID autonumber field, and they are all one-to-one relationships). All of the tables feed into one form. I have added the "add new record" button to the form, but when I click on it, it only adds a record to the parent table. The only way I have found to solve this is to go into each individual table and add a new record. Is it possible to have a new record added to every table when I click the "add new record" button on the form?

View 7 Replies View Related

Forms :: Adding New Record To A Form

Jan 25, 2015

I am new to Access and I was trying to create database for chemical inventory handling.I have two tables. one of my tables (chemical info) has information on chemical properties. I used "Cas NO" as primary key. I have another fields such as "chemical name", 'product number" and etc.

In Second table (chemical inventory) i have "ID" field as primary key and I used lookup wizard in order to fill "Chemical Name" field. I thought it will be easy to pick up name rather than typing it because the names were complicated.After I created two forms. one form is chemicals info form based on chemical info table and other one is LAb_inventory based on chemical inventory table.

I set up Lab inventory form as main form and Chemicals info form as subform. Linking field is chemical name. So that when I chose chemical name from combo box i can see inventory data in main form and chemical properties information in subform. Now i have two problems..One of them is when I add new record to my subform I cant see this new record in main form. I suppose it is because chemicals names of each form is derived from different tables. furthermore in main form instead of chemicals name i see "my primary key CAS NO".

What i want to achieve is add new record to chemicals info form and fill up all chemical information save and in the main form to add new record choose new chemical name which i just added and fill up inventory information.

View 1 Replies View Related

Forms :: Adding New Record To A Form

Jan 25, 2015

I am new to Access and I was trying to create database for chemical inventory handling...I have two tables. one of my tables (chemical info) has information on chemical properties. I used "Cas NO" as primary key. I have another fields such as "chemical name", 'product number" and etc.

In Second table (chemical inventory) i have "ID" field as primary key and I used lookup wizard in order to fill "Chemical Name" field. I thought it will be easy to pick up name rather than typing it because the names were complicated.After I created two forms. one form is chemicals info form based on chemical info table and other one is LAb_inventory based on chemical inventory table.

I set up Lab inventory form as main form and Chemicals info form as subform. Linking field is chemical name. So that when I chose chemical name from combo box i can see inventory data in main form and chemical properties information in subform. Now i have two problems

One of them is when I add new record to my subform I cant see this new record in main form. I suppose it is because chemicals names of each form is derived from different tables. furthermore in main form instead of chemicals name i see "my primary key CAS NO". What i want to achieve is add new record to chemicals info form and fill up all chemical information save and in the main form to add new record choose new chemical name which i just added and fill up inventory information.

View 6 Replies View Related

Forms :: Highlight Unbound Subform Record That Matches Other Subform Record

Jan 22, 2014

I have two unbound unlinked subforms residing on a 3rd unbound main form. When I enter the current record on Subform1 I would like the matching record(s) on Subform2 to be highlighted or otherwise formatted. I can get this to work for only the first record on subform2 due to the way I have my code setup on Subform1:

Code:
Private Sub Accounting_Unit_Enter()
'find where AUs match. only works for first Subform2 record
If Me.[Accounting Unit] = Forms!MainForm.[Subform2]!AccountingUnit Then
msgbox "Match"
End If
End Sub

My thought was that I needed to reference the Recordset of Subform2 and search for all AccountingUnits that match the current AccountingUnit of Subform1,

View 6 Replies View Related







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