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 Replies
ADVERTISEMENT
Nov 18, 2013
Working with Access 2000
I have a Continuous subform based on a query based on few linked tables.One of those tables has a Yes/No field which shows in the subform.
I want to be able to change the status of this field for each record independently, so I placed an unbound check box in the subform Detail section and a Command button on the subform Header section. However when I click one record check box, all of them change, I did not expect that. How do I move forward to get this done?
View 10 Replies
View Related
Sep 23, 2013
I have synchronized a form with a subform with the following code:
Private Sub YourField_DoubleClick() 'this code is behind the subform
Dim rs As Object
Dim strLinkValue As String 'value in link field of the subform
strLinkValue = Me![NameOfLinkFieldOnSubform].Value
Set rs = Forms!YourMainForm.Recordset.Clone
rs.FindFirst "[NameOfLinkFieldOnMainForm] = '" & strLinkValue & "'"
Forms!YourMainForm.Bookmark = rs.Bookmark
End Sub
Every thing works fine but now I would like that the row in subform remains selected in the subform when the user doubkeclicks the record in the subform.Now after doublecliking the subform highlight the first row.
View 4 Replies
View Related
Aug 31, 2013
I would like continuous subform as a list box in my file. Now when click fields on my form the entire record will not be highlighted. In the sample I have found from the net when click on each field in the form entire row will be highlighted. So I try to using function in the sample for my own but it does not work and when I click on each field just that field in 1 second will be highlighted and entire row will not be highlighted.
Private Sub P_ForceHighLight()
On Error Resume Next
Dim ct As Control, ct1 As Control
DoCmd.Echo False Set ct1 = ActiveControl
For Each ct In Me.Detail.Controls ct.SetFocus
[Code] ....
View 1 Replies
View Related
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
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
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
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
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
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
Jan 5, 2014
I'm trying to build a search form.- Access 2007
I have a table (Table1), contains a 'part' field.
I wan to build a form with a blank text box (txtbx1) where users can enter a part description, this will search records in Table1>part and return a list of parts that match the textbox input.
Here's what I've done -
txtbx1 - property sheet - control source - part
event - on enter - ...
I've built an expression -
[Table1]![part] = [txtbx1]
hoping that this would match records 1n Table1 to txtbx1
View 10 Replies
View Related
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 2 Replies
View Related
Oct 23, 2014
I would like to highlight record when user will click Record Selector in the continuous form. How to do it?
View 1 Replies
View Related
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
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
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
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
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
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
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
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
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
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
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
Jun 28, 2013
When we browse through records in a subform we store the records in the database.When we want to delete a records for example the third record from the five records always the first records will be deleted. How can we delete the records where the cursor is at? When we are at the third record and press the delete button the third record from the list in the subform should be deleted.
Code:
Option Compare Database
Dim FocusBln As Boolean
Private Sub Identificeer()
Me.[Datum Aangemaakt].Visible = True
Me.[Datum Aangemaakt].SetFocus
If Me.[Datum Aangemaakt].Text = "" Then
[code]...
View 11 Replies
View Related
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