Topics Search

Search Main Form Based on Contents in Subform

Search Main Form Based on Contents in Subform
Views: 16
I am trying to get the search field [contents] in my DataEntry form to work. I want it to search all the contents and show the only the records that have those contents in the main form.

The main form shows all the boxes. I originally just added the [BoxContents].[Contents] field to the main form and sorted the query based on what was entered in the text box.

The problem is there can be multiple content records for each box so it shows the same box over and over again depending on the amount of contents.
Sponsored Links:

More topics

 

search a subform field from a Search tab on the main form

Preview
I have 1 main form (USER) and 3 subform ( ASSET, INVOICE, LO) which related together. I need to create search button in a main form that only can search ASSET_ID. it means find the record through subform. how can I do that?
 

Search as you type question

Preview
I have a search form which has the SEARCH AS YOU TYPE function.

Now when I double clicked on to the searched item, it will show me the main form with the information that has been saved including the subform but it does not take me directly to the specific record in the subform.

For instance, In my main form, I have an option to choose A.M., LUNCH or P.M.

Accordingly, whichever one I click, it will be visible as a subform. For example, if I click A.M., the A.M. SUBFORM will be visible. If I click LUNCH, the LUNCH SUBFORM will be visible and the rest hidden.

How do I link subform to the search form so that if I click on to MR.A’s form for LUNCH time only, it will open up the main form with LUNCH subform.
 

Main form running a search on Subform

Preview
I have only 1 table that I'm working with I simply want to have a form that runs a search on one of the fields and returns the results.

This is what I have:
....
I want to create a form that has a main form with a text field that I can input a string of text and run a search on the problemtype field. And return all the results in the subform with based on keyword that was inputed in the form above.

I want the results to display Problem type and Technician fields. What is the best what to do this?
 

Saving record on subform

Preview
I have a subform connected to a main form. The subform is a tab form with a one to many relationship. The subform directs data from one of the fields in my subform into another hidden field in the record.

it is based on an if then statement based on a field in my main form. THe problem is that the code will not recognise the information in the subform until I leave the main form (or it loses focus) and come back.

Then my code works fine. I've tried DoCmd.RunCommand. AcCommandRecordSave and that didn't work.
 

Referencing Controls on Forms

Preview
I have a main form, 2 sub forms, and 2 text-boxes on the main form. I have a search box now for the first subform. Works perfectly. Once the users filtered based on name, I want them to be able to select that filtered record which would filter another subform.

My first attempt was to assign the ID that was selected to a textbox on the main form, then automatically requery the second subform based on that value. I used this way on my search box. I'm sure there is a way to go directly from clicking the value to requerying the second subform, but I don't know it. If you do,

That being said even the indirect first attempt isn't working. It all has to do with the ".", "!", and ordering of this stuff. I'm not sure what . and ! mean. Cananyone explain them, It has to do something with Parent child, but beyond that I'm at a loss.

Me.[Collateral] = Acct_Reference_id
Me.[Navigation]![textbox] = Acct_Reference_id
...
'Me!Subform1.Form!ControlName
'Me!Subform2.Form!ControlName
'Me.Parent!ControlName

I did find this very useful site [LINK]. It shows what code you can use depending on where you are and what you're doing. Even with that as a resource, I'm still at a loss.
 

Text box based on combo inside subform

Preview
I have a subform located inside my main form. The subform is linked to the main form so the data shown in the subform matches the main form.

I have added a combo box to the subform and I'd like to have it populate the fields in the subform, but still have the entire subform linked to the main form.
 

Subform value in main form - error 2113

Preview
I'm trying to use the contents of a subform to populate the value of a textbox on my main form. I'm in my main form, I have a tab control that contains a subform control. In the OnChange tab I code the following:

CounterClaim_Appl.Value = Me!subfrmRep_Resp1.Form!ContacT.Value

me = mainform . subfrmRep_Resp1 = subform control . Contact.Value = contents of that field (I'm thinking)

I'm getting an error 2113 - Value entered isn't valid for this field, do I need to reference the tab control
 

Refresh the contents of a subform whenever the record in the main form changes

Preview
In Access 2003/XP/2000/97, how do I refresh the contents of a subform whenever the record in the main form changes?
 

Search Box Requerying Subform problem

Preview
I'm trying to build a text box to filter a subform. I have the main form "Navigation", the subform "Loan Search subform" and the textbox "Search"

When I run the Loan Search query with Search populated, it filters and works correctly. When I try to have it requery automatically, it doesn't seem to.

I have tried every combination of

Forms![Navigation]![Loan Search Subform].Requery
Forms![Navigation]![Search].Requery
Forms![Navigation].[Search].Requery
Me![Loan Search subform].Form.Requery

that I can think of. Some throw error messages. but no requery occurs.
 

Searching a Subform

Preview
I have an access database with a main form which is the people_tbl and a subform which is called the TanfActivity_tbl and the childrens_tbl. The users and myself are unable to do a search in the subforms, is there some way I can make it so that the users can search fields in the subforms as well as the main form. For instance the TanfActivity_tbl has dates that they need to search a persons Activity by. Is there some kind of code I can use to do that?