Forms :: How To Lose Focus From A Subform When Selecting Record

Dec 17, 2014

I have a form, with a subform,

When a user selects a record from the subform i use this to view the record in the main form

Private Sub Txt_Support_Name_Click()
DoCmd.ApplyFilter , "ID =" & Me.ID
End Sub

However when i select the record from the subform, it populates the form as required, however then the top record of the subform is highlighted.

Any way to either - highlight nothing, or highlight the selected row?

View Replies


ADVERTISEMENT

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

Verifying Data In A Text Box When It Lose Focus

Jan 17, 2012

I have a form and one of the text fields I need to verify against data in a table. I think the best way is to check the field once it loses focus on that text field. If the data is not in the table then the user is prompt with a msg "Invalid data, Please try again". I'm using Access 2010 to develop. I need query to run the validation.

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

Forms :: Selecting Record From Subform And Showing In Mainform?

Jul 28, 2014

My Database is really simple, it contains 1 table (called Querys) and a form called Dashboard.

In my main form (Dashboard) I have inserted a sub form which shows all the records in my table (called Querys) when I use my main form and add a record this sub table can then be refreshed and it shows all my records.

This part is fine,What I would like to do is be able to select a record in my sub form and it show the record data in my main form. This would really speed up the navigation process as the database gets bigger.

View 3 Replies View Related

Lose Record Edit Via Form; Input Continues As New Record

Sep 22, 2004

PROCESS AS DESIGNED: The user logs in and is given a form displaying existing records that are coded (by userid) for that user to update. From that list, the user selects a record and continues to a second form (the first form closes) which displays all the fields of the selected record which should/can be edited by the user (plus a few non-editable key fields). There is nothing tricky to how the records are selected for display. A simple query behind the first form selects data records using the userID number. The second form does a simple record select using the active record ID number on the first form. Nothing tricky -- no modules just queries, tables, forms and simple macros to string it all together.

The user can open/close these two forms as often as necessary and the record will continue to show up until a value is entered into a "completion date" field. When that field is no longer blank, the record will no longer be displayed for use.

PROBLEM: About 90% of the time, things work as expected. But 10-15% of the time, somewhere between opening the record in the second form and closing the second form, the edited record totally disappears (as if it were never opened, it isn't even system date stamped) and the input information is inserted instead into a brand new record.

Users can sometimes tell when the edit record is dropped during processing, because key fields displaying previously entered data go blank and the displayed recordID (autonumber) is changed. p>
ERROR PATTERN: NONE! It can happen as the edit record is first opening, in the middle of editing the form, or at the end when closing the form. It will happen on a specific PC 2 times in a row and the third time be fine. It has happened at multiple locations but not for all people and not consistently for the same person/same pc. The same record that failed can be re-selected and work just fine the next time.

I cannot reproduce the error myself. I have tested everything I can think of without causing the error. I can lose changes and avoid a system date stamp if I abort my Access sesssion, but that doesn't create/insert a new record with my new input. It just loses everything.

I have wondered if a momentary break in the network/communications could break the connection to the application to just enough that the form remains on the screen, but selected record is discarded. Input into the empty form would/does insert a new record.

I have asked the IT Operations group to investigate if a network/communication problem could be the culprit, but they haven't gotten far on this. I have never seen this happen before and am totally stumped but am desperate to resolve it before user confidence is damaged.

View 1 Replies View Related

Selecting Record's Column In Subform

May 22, 2005

Hi All,
What is the easist way to select a column's value in a subform. After the record is selected I would like to write a value ("0") into this column by way of a button click..

Thanks in advance..

View 4 Replies View Related

Subform Run From Query, Lose's Filter When Adding Data.

Mar 14, 2006

I have a form which is linked to a query. The main form which calls this form sets the filter for the query. This works fine and I can navigate all the filtered records.

The problem is when I go to add a new record the filter information goes away.

For backround this is DB for project information. The user clicks a button to view notes on the project. The notes are stored in a different table and the project_id is the common field which links the two together. I want this to function where the user can open the subform read the notes and add a new one if needed.

View 1 Replies View Related

Forms :: Set Focus To A Subform

Mar 20, 2014

If i open a form with a sub form on can i open it so that the focus go directly to a control on a sub form.I have tried to do it with a macro on the on open event to go to control but it comes up that the control don't exists on the sub form.i am using access 2010.

View 6 Replies View Related

Forms :: Set Focus On Subform Control?

Mar 7, 2014

I have a form with a subform on it. The subform has subforms. I need to set the focus on a control on one of the subforms. Here is what I am using.

START OF CODE
Forms!frmMain!frmMainSub.Form.frmContactLog.SetFoc us
Forms!frmMain!frmMainSub.Form.frmContactLog.Contac tMethod.SetFocus
END OF CODE

I use Code 1 to get to the third level. Code 1 works.

Code 1
Forms!frmMain!frmMainSub.Form.frmContactLog.SetFoc us

When I add the second line, Code 2, it doesn't work. I get the message "Run-time error 438: Object doesn't support this property or method."

Code 2
Forms!frmMain!frmMainSub.Form.frmContactLog.Contac tMethod.SetFocus

View 2 Replies View Related

Forms :: Set Focus To Last Line Of Subform

Jan 21, 2015

I have a single main form with a datasheet subform. When I scroll through the records shon in the main form, each has a different set of child records shown in the subform.

I want the focus to be on the last record of the subform each time.

On the main form, I have a button and this code

Code:
Private Sub cmdLast_Click()
Me.frmRevisionsSub.Requery
Me.frmRevisionsSub.SetFocus
Me.frmRevisionsSub.Form.txtRevTag.SetFocus
DoCmd.GoToRecord , , acLast
End Sub

which works perfectly, when I click the button.

If I call this code from main form's OnCurrent, focus remains on the first line of the subform instead of going to the the last. I have an inkling that it has to do with when the requery of the subform takes place, when I scroll through the records on the main form.

View 1 Replies View Related

Modules & VBA :: Event That Trigger On Selecting A Record Of Subform

Jun 30, 2014

I've got a subform that im writing code for, once a user enters a value in one of the fields i want to make sure they cant change that field (and two other fields in that same record, though the rest of the fields are fine to edit at will)

I've got a function already written to validate the data in the record and decide whether or not the fields are enabled and disabled, however im having trouble finding an event in which to activate the function

Is there an event that triggers whenever a user selects a different record?

Any chart or list with all the handlers and how they trigger (in relation to each other) and when?

View 1 Replies View Related

Forms :: Subform Takes Focus From Top Of Main Form?

Jun 29, 2014

I have a form that I created that has a tab control. When the form loads, it automatically sets the focus to a field in the subform. This wouldn't be a problem, except when it does it hides the tabs at the top of the form so I have to go and scroll back up every time I click a tab so that I can see the tabs. Is there a way to adjust this? I have tried hiding a field and setting the focus to it and that didn't work. I also tried setting the focus to the actual tab, but that also did not work.

View 8 Replies View Related

Forms :: How To Keep Focus On One Record

Jun 22, 2015

I have a customer provide his or her SSN. If the SSN matches a record in a table the form opens specifically on that record (no problem). If the SSN doesn't match a record, the form adds a new record (again, no problem).

The issue I'm having is with the new record. The customer is able to scroll through other records (page up, page down), which is a no-no. I need the form to be locked on the new record. I've posted my code below.

Private Sub Command543_Click()
On Error GoTo Err_Command543_Click
Dim strCriteria As String
Dim rst As DAO.Recordset
Set rst = Me.RecordsetClone

[Code] .....

View 5 Replies View Related

Forms :: On Got Focus Move To New Record

Jun 23, 2013

I have a subform that I use to scan in products using a barcode reader, when the item scans it moves to the quantity (Qty) field where I have this code:

Code:
Private Sub Qty_GotFocus()
Qty.Value = 1
DoCmd.GoToRecord , , acNewRec
txtOrderNo.SetFocus
End Sub

I am simply trying to set the Qty value to 1 and move onto the next record ready to scan another product in.

View 10 Replies View Related

Forms :: Selecting Record From Combo Box

Jun 24, 2013

I have a form to modify existing property records. Each record has a PIN number and a unique ID which is a combination of year, state county and PIN. The same property can have a record for more than one year. On this form I have a combo box for selecting the record to be modified. The combo box includes PIN and Prop ID. The combo displays each record by PIN then ID as separate records. For example:

PIN Prop ID
06104409012 2007-IL-Lake-06104409012
06104409012 2010-IL-Lake-06104409012

But when I select a record it will always select the first record with identical PINs. In the case above if I click the 2010 ID the record fills in with the 2007 ID.

View 3 Replies View Related

Forms :: Selecting Only One Record In Continuous Form?

Nov 13, 2013

I wish having only one record display in a continuous form, after an "On Click" event. The database in which this question lies is attached.

On opening, the user first interacts with Table 1 (Continuous Form), then by clicking on ID on the details for that particular record appear.

What I would like to do is: When the user clicks on ID, only that record whose ID has been clicked on displays first on the continuous form, and then the PERSONAL form opens. To clarify further, my wish is that the sequence of events is:

User Opens Table 1 Form

User Clicks on ID (for example, let's take 2)

Only Record with ID 2 remains on the Continuous form.

Then details for record 2 display on the Personal Form that opens next.

The problem I currently have is with step number 3 above.

View 10 Replies View Related

Forms :: Selecting A Record From Listbox - Double Click Event

Jan 3, 2014

I would like to select a record on an already open form called "form_candidates" using a search facility but can't get it to work.

In "form_candidates" the data settings are set to "yes" (filters/edits/deletions/additions) and data entry is set to "no". On opening, the form is set to go to a new record.

In this form I have a button that opens a record search form so both forms are now open. I enter the first few letters of the surname into a text box, press a button and the listbox is populated.

In the doubleclick event of the list box I have the following code:

Dim CandID As Integer
CandID = Me.List4.Column(0)
DoCmd.OpenForm "form_candidates", acNormal, , "forms![form_candidates]![Cand_ID]=" & CandID

So I double click on the record, the candidate form is being filtered but the record isn't being shown.

View 3 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

Forms :: Move Focus From Last Field Of Subform To Another Field On Main Form

Aug 19, 2015

I am currently stuck on set focus property. I have a main from with nested subform. I am trying to move the focus from last field of the subform to another field on the main form.

Customers(mfrm)....>Addresses(sfrm)...>Orders(sfrm Add)......>OrdDetails(sfrmOrders)

Now I have a field name [Securedesign] in frmOrderdetails and I want the tab order to navigate to field [CustomerID] in frmAddresses which is a subform to frmCustomers.

View 2 Replies View Related

Forms :: Selecting Record Results Out Of A List Box In Form - Access 2010

Nov 13, 2013

I am relearning Access and having a little difficulty. I am creating a Access database that links tables from an I series system which I have done trouble free. In the database I have pulled up for example a patient demographic file (hospital). I have form frmSearch that prompts the user to enter the medical record number OR they can search by name. I have a query that takes that information then loads a 2nd form to display the query results in a list box. I would like to be able to click on one of the results from the 2nd form to then load another form that will display all of the patient information that was selected.How do you set this up so that with the results shown, I can click on one of them and it will load that patient into another form pulling the rest of his or her information from the table file?

View 12 Replies View Related

Set Focus To A Sub-sub-subform

Jan 2, 2007

I have 4 nested forms:
DataEntryMaster
DataEntryMainSub (subform on DataEntryMaster)
DataEntrySub2 (subform on DataEntryMainSub)
DataEntrySub3(subform on DataEntrySub2)

In the AfterUpdate even of DataEntrySub2, I have code that checks to make sure the field on DataEntrySub3 (it has only one field) has been filled in. If not, I want to set the focus to DataEntrySub3.

The code in the DataEntrySub2 afterupdate event:
if isnull(me!dataentrysub3.productbarcode then
msgbox "You must enter a product barcode!"
forms!dataentrymaster!dataentrymainsubform!setfocu s
forms!dataentrymaster!dataentrymainsubform!dataent rysub2.setfocus
forms!dataentrymaster!dataentrymainsubform!dataent rysub2!dataentrysub3.setfocus
end if

I've used this most-wordy syntax because I couldn't get the shorter syntax (eg, me.dataentrysub3.setfocus) to work at all. However, this STILL doesn't work.

What's really puzzling is that if I run those exact same 3 setfocus statements from the immediate pane, they work fine. But in the afterupdate event, my focus always ends up on a control in dataentrysub2.

Any ideas???

View 1 Replies View Related

Subform Won't Surrender Focus

Mar 9, 2005

Well, the title says it all really. After I click into the subform and type something in a text box, the focus will not return to the parent form, via mouse or tab. I can't even switch the form back into design view, it appears to be totally locked. Has anyone run into this before?

View 4 Replies View Related

Set Focus To Subform But Do Not Activate

Sep 28, 2006

i won't go into details except i am doing databases for cemeteries - very complicated
example
i have come across two people who have the same name, date of death, buried in the same grave on the same day but are not related and must have seperate records!!
my main table has 6 primary keys. [even then i have 2 duplicates who are not related]
anyway one of the problems is this
i have a main form with 2 subforms. the main form is unbounded. i need to copy information from 1 of 4 queries run by the main form [QBF] to one of the subforms. i don't know which query untill i view the data.
when i know which one, i press a command button which copies the information to one of the subforms. when i repeat the actions above instead on the new query data going into a new record on the subform it overwrites the existing data instead of pasting it into a new record.
i have tried setfocus command - this works only if i click on the subform and activate it [this defeats the object of the command as i might just as well click in a new record box on the subform].
in essence i do not need to activate this subform at all. i just need to check if a record exists and if it does goto a new record [again this works only if i physically click on the form]
any ideas how i can force the cursor to goto a new record without physically clicking on the subform??

thanks

View 6 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

Validation Before Focus Enters Subform

Aug 25, 2004

When I click on my subform after entering some data in the primary form, I get this error message:

"The Microsoft Jet database engine can't find a record in the table <name> with key matching field(s) <name>. (Error 3101)"

This is because I have not filled in a ItemCode, a combobox, on the parent form and ItemCode is part of a one-to-many relationship that involves automatic filling in of other fields such as ItemDesc, UnitPrice, etc. How do I code the validation that handles such an error?

Thanks in advance,
Swee

View 4 Replies View Related







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