Forms :: Subform Won't Allow To Add A New Record

Feb 13, 2014

I have a Demographics form with a Contacts subform.

They match with two tables: Demographics and a child table, Contacts.

If it matters, all the tables are linked to a back end database.

When I go to enter a new record on the Contacts subform, it "redirects" me to the first record.

Update: If I go to the datasheet view, the subform just continuously flashes...

View Replies


ADVERTISEMENT

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

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

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 :: 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 :: Select Record From Combobox List And Have Record Populate In Subform

Sep 16, 2013

I would like to select a record from my combobox dropdown list and have that record populate in my subform. Currently, I am only able to select the 1st record at the top of the dropdown list to appear in my subform. But I would like to select any record from the dropdown list and have it populate my subform.

View 8 Replies View Related

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 2 Replies View Related

Forms :: Saving New Record When Moving To Another Record In Same Subform

Jan 17, 2014

I have a subform with records of call details (date, time, subject) - the date and time are autogenerated and subject is a text field. After entering text in the subject field and then clicking on the close button in the main form, or clicking anywhere else in the main form, the record is saved to the table. However, if I enter text in the subject field and then move up to view previous records (within the subform) and then click the close button in the main form the record is not saved in the table. How can I either save the record before allowing the user to move to another record within the subform or before exiting the subform set the focus to the new record so that it will be saved on exit?

View 4 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 :: Continuous Subform - Last Record

Sep 14, 2014

I have a main form with a subform in continuous format. The subform displays the list of records and has a delete key allowing the user to delete that line (record) All works except if the user clicks the delete button on the new record line. Then there is an error message. Rather than use error trapping I would like to code a message OR simply beep to confirm nothing was done OR have the delete button disabled until something is entered into the record. The records do have a autonumber which I have in a hidden text box. I tried the following and even though the code shows that LineID does in fact = Null the code does not fire.

If Me.LineID = Null Then
DoCmd.Beep
Exit Sub
End If

View 4 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 :: Find A Record On A Subform

Feb 14, 2015

On a from ("Customers") with tabs I have on the second tab a subform ("Orders") as a single form with a field "Ordernumber". "Customers" and "Orders" are linked through "CustomerID".

On the mainform I have a "searchfield" in which a enter the Ordernumber, I want to find.I cannot manage it, that After_Update of the "searchfield" the ordernumber is found on the subform and the focus is on that subform.The focus only shows me the CustomerID on the first tab, but does not jump to the second tab exactly to thes searched ordernumber.

Code:

Private Sub searchfield_AfterUpdate()
Dim rs As Recordset
Me.CustomerID.SetFocus
Set rs = Me.Orders.Form.RecordsetClone
rs.FindFirst "ordernumber = " & Me.searchfield
If Not rs.EOF Then Me.Orders.Form.Bookmark = rs.Bookmark
End Sub

View 3 Replies View Related

Forms :: Datasheet In Subform Won't Allow To Add A New Record

May 15, 2013

I have been handed an Access database (Access 2002-2003 file format) to clean up and update as necessary. Currently I am trying to add new rows to a datasheet that is in a subform. I have had no trouble in the past adding rows and for some reason now I can't.

In some instances I can update an existing row but never add a new one. Also, the records options are greyed out in the ribbon except for a select few that are not useful (refresh all, totals, more). Can't add new record from their either. I am in the main form that contins the subform which contains the datasheet, in form view.

View 5 Replies View Related

Forms :: Show New Record Row In Subform

Oct 3, 2013

I have a subform in which the users enter job update information. When an update comes in, they simply enter the information in the new record row, denoted by a * in the left hand column. Each record is timestamped (=Now()) and sorted by newest date first.

Is it possible to display the new record row (the blank one with the star) first? I attempted to add the Autonumber ID, hide it and sort by that but it simply comes up with "(New)" in the ID field.

View 2 Replies View Related

Forms :: Go To Specific Record In Subform

Mar 31, 2013

I have a main form and a nested subform. The main form is based on customer details and displays customer name and the customer primary key (custID). When this form is opened i pass two parameters to it, BPID and SIID. A BP is a business picture and a SI is a sales interaction. These are in a one to many relationship.

The subform displays a sales interactions (si) of a business picture (bP).The subform is set up with master child links of custid;bpid. This restricts the subform to only showing records for the a specific customer and specific BP (the user can cycle through all the linked SI's using the record selectors.

When the main form is opened I want the subform to display the sales interaction the user has selected when opening the main form based on the passed SIID but cannot get this to work. At the moment the subform just displays the first record.

View 2 Replies View Related

Forms :: Subform Not Displaying Record

Apr 13, 2015

I have 3 tables:

tblAnagrafica
TabellaPIP
TabellaJoinPIP

By wizard I have build a form that collect data from a query: "QueryPIP2Tabelle"

The main Form :" frmtblAnagraficatest"
display correct data from tblAnagrafica,

BUT the subform: "frmTabellaPIP Sottomascheratest" does not display data from TabellaPIP.

Relations are many -to-many but, because it's my first building database, can be incorrect.

Database1.accdb

View 2 Replies View Related

Forms :: Go To A Record On SubForm With Listbox

Jun 28, 2014

I have a Listbox that I want to use to go to a record on a subform. I know that it cant be done with the wizard.

The records that I am looking at don't have an ID so I want to look at both a date field [TrainingDate] and a Time Field [TrainingTime]. I have set the querry up and the list gets populated with the correct information. And I have added the following code to the AfterUpdate Event

Code:
DoCmd.SearchForRecord , "", acFirst, "[TrainingDate] = " & Str(Nz(Screen.ActiveControl, 0))

The reason that it has no RecordID is that the records could be imported and that would produce duplicates.

View 1 Replies View Related

Forms :: Select A Record From Subform?

Aug 11, 2013

I have a search form with a subform (it's a query). When you search for an entry, the results show up in my subform.

Is it possible to select that record from my subform and have it open up in my main form for making changes to that entry? Either with a control button, macro or coding?

Screen shots: The first is my search form, the second is my data entry form.

View 1 Replies View Related

Forms :: Subform - Set Focus To Other Record

Jan 2, 2014

I have a form with a subform which is sized to show several records at the same time. If Record A has the focus, and I click anywhere in Record B, then Record B gets the focus, as expected. ... Except if I click on an Image field in Record B, when the focus stays on Record A.

How I can force it to set the focus to the other record ? I don't think this can be done with Events handlers, as they need to have the focus set first.

View 5 Replies View Related

Forms :: Opening Subform After Entering New Record

Feb 17, 2014

What is the best way to open a linked subform using a button while in a newly created record?

I thought a simple

Code:

docmd.save

command would do (either in the "current record" or the "after update" event)

View 4 Replies View Related

Forms :: Updating Record Source Of A Subform

May 19, 2015

I currently have a query that a subform uses to display some results. In this case, there are 3 columns displaying the name of a sandwich, the ingredients, and the number of servings of each ingredient. It looks like this:

SandwichName IngredientName Servings
Accordian Lettuce 1
Accordian Ham 1
Accordian Cheddar 1
Accordian Mayonnaise 1

That is the current output to the subform. The SQL statement I use to generate this list is here:

SELECT [TBL_Sandwich].[SandwichName], [TBL_Ingredient].[IngredientName], [TBL_SandwichContent].[SandwichTotalServings]
FROM (TBL_Sandwich INNER JOIN TBL_SandwichContent ON TBL_Sandwich.SandwichID=TBL_SandwichContent.Sandwi chID) INNER JOIN TBL_Ingredient ON TBL_SandwichContent.IngredientID=TBL_Ingredient.In gredientID
WHERE TBL_Sandwich.SandwichID=6;

I have bolded the last item the 'SandwichID'. It is this number I need to change dynamically based on a button being pressed on the main form. Essentially they enter a new sandwich, put the ingredients in, save it io the database, and I save the servings for each item as 1. Now I'd like the new sandwich to be displayed in the subform using the new ID of the sandwich which was just created.

If I try to put this long SQL statement in the RecordSource property I am told it's too long for the property to handle so I can't set this property dynamically. how to get the subform to requery with the new ID number of the item I just generated. I can get the ID number via DLookup, that's easy, but setting the subform to use this is my problem.

View 8 Replies View Related

Forms :: Display Record Count From Subform In Tab

Jul 1, 2014

I have a form that contains a number of tabs, each tab then contains a subform. The basic gist is that there are clients and each client chart needs to be audited to make sure that the every clients chart has all of the correct information in it. So if for example, each client needs an initial treatment plan, there would be a tab called Initial Treatment Plan that would contain a subform (continuous form) displaying all of the clients that are missing this information.

I would like to display the number of records that are being displayed in each subform in the tab next to the name to make it easier for the auditor to know how many which tabs have content to be updated. For example, if there are 10 clients that are missing their initial treatment plan, the tab would read "Initial Treatment Plan (10)".

I was able to get a total number of rows in datasheet view, but I don't know if there is a way to have that field as a hidden field in continuous form view that can have its value displayed in the tab.

View 6 Replies View Related

Forms :: Listbox On Subform To Find Record?

Dec 20, 2013

Is it possible to put a listbox on a subform where it will allow you to find a record on the subform? The wizzard dosen't sem to allow me to do it!

View 5 Replies View Related

Forms :: Subform Adds Blank Record?

Nov 10, 2013

I have a subform that stays in data sheet view for entry, the form this sits on is launched by a macro. This macro on the main form launches the form and adds in the linking numbers by a setvalue. The main form has the linked number on it and this number is then linked by master and child to the subform. The problem comes in when you start adding in data. The line of data is filled by using combo boxes and some text fields and ends with a time/date stamp Now(). The problem is, even if you dont fill the entire line if a user refreshes or closes the form it adds a blank entry with the linking number but all fields blank.

View 1 Replies View Related

Forms :: Subform Record Selector Moving?

Aug 21, 2014

When moving from a subform back to the mainform and requerying one of the mainform controls, the record selector of the subform moves back to its first record. ...

GoToRecord (,,Next) '(in the subform-this is correct)
SelectObject
Object Type Form
Object Name pv '(go back to the main form)
In Database Window No
GoToControl (SubTot)

Requery (SubTot)If I remove the Requery, the record selector remains where it is supposed to be. The SubTot data source does include the aggregate dsum value of the subform's underlying table. What is strange is that this has been running properly for many years until it was upgraded from .mdb to .accdb format. Is there an easy way to make the record selector stay put?

View 6 Replies View Related

Forms :: Finding Record-count In Subform?

Aug 24, 2013

I need to check the recordcount in a subform of a navigation frame form in VBA. What is the proper syntax. I have tried multiple things but cant seem to get it. I would rather not use dcount.

View 1 Replies View Related







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