Forms :: Adding Search Option In Main Form

Jun 25, 2013

I have two tables called "tblFundingBodies" and "tblGrants". I have a form that allows me to view all the records for each of the funding bodies. By this I mean, it shows information on a funding body but to see information on the next funding body, I must click on the next record button. Just wanted to clarify that it isn't in the form of a table.

This form also has a subform in the same format that shows each of the grants that funding body has provided. When I select the next record from the main form, it will show me the grants from the company in the next record. The field that has the funding body is a text box.

I want to be able to add a seach facility to the main form that allows me to search for a funding body and get back exactly what I have described above, but just the details on that funding body/grants. In other words, I want the form view of the funding body I search for with the sub form of the grants from that funding body, not in the form of a table where you can see them all at once, I want to be able to click through each grant in the sub form.

View Replies


ADVERTISEMENT

Forms :: Main Form And Subform Search For Same Record

Nov 20, 2014

I am currently working on a project in access 2010 and I am having a search for record dilemma. I have a main form that has a subform in it under a tab control. I place a search box at the top of the form so that user could select either the ID, the internal case number, and/or the reviewer name in the text boxes to search the record.

I have tried the using the search for record macros and the convert the macros to VBA and possibly write so extra coding for calling the subform into the search but nothing seems to work in getting the search in sync between the main form an the subform. VBA code that will look for same record in both forms.

The reason for the tab control is because depending on the data entered the users switch between mid section data about case and so one set of info goes into one tbl and the other goes into another, but the subform that I am referring to in this question is being generated from the same tbl as the main form.

View 2 Replies View Related

Forms :: Adding Subform To Main Form As Another Tabbed Page

Jun 25, 2013

I am modifying an existing form that has some tabbed pages(subforms) in it and I am wanting to know how to add another page. I have created another subform that I am wanting to add to this main form as another tabbed page.

View 1 Replies View Related

Forms :: Adding Multiple Records To A Table Using Main Form And Not A Subform

Sep 12, 2013

I have an existing Main form that has a sub form that the user uses to enter multiple records into a table....it works fine EXCEPT that I need to make it even easier and more intuitive and add a lot of labels. Basically the user selects items from a drop down list that adds items to a Work Order. I need to add some labels to the form to make it more descriptive for the user.

So, what I want to add multiple records using a single main form.

Is is possible to?:

1. simply turn the subform into a single main form? Can this be done by using a Command button or something similar?

2. copy all of the controls etc from the sub form into a new main form and have it all work nicely?

View 2 Replies View Related

Forms :: Search Text Box With Option Box As Criteria For Search

Mar 4, 2014

I am creating a a text box where the user enters a text then clicks an option from the option that is used as the criteria for the search e.g. Last Name, Phone , address then a command button wil run a query.

View 3 Replies View Related

Forms :: Search By Date Option?

Jan 13, 2014

I have a text box for the user to enter the week number, I started thinking I wanted to have some more options here, can I be abit more clever with the options when designing a form to search by date?!

I want criteria like....

Specific Date
Between Dates
Current Week
Last 30 Days

View 8 Replies View Related

Search Form With Option Buttons

Oct 18, 2005

Hello,
I have a form named Welcome which I want to use as search menu for my database.
I have added 4 option buttons and a unique textbox into which users will write their query criteria.
My database has 4 queries and each option button should refer to one of them once selected

Obviously I will need a command button that will run the query.

Any help or code to do this? Thanks.

View 1 Replies View Related

Forms :: Search Text Box For Specific Word - Find Option

Sep 18, 2013

I have 5 textboxes and a multiline textbox in a form in my Access Database. I am going to type several keywords in those textboxes and I am going to type an article in the multiline textbox.

What I need to do is I want to calculate the keyword density in the article. I can do that if i know how to search the whole text in the article and count the specific word. And I want a function to count all the words in the article too.

View 1 Replies View Related

General :: Dynamically Adding Option Controls To A Frame On A Form

Aug 20, 2012

In Excel, I can dynamically add option controls to a frame on a form using the Control.Add method. Is there an Access Equivalent? I can only find Count & Item as Control. items.

It might have something to do with design view i guess.

View 5 Replies View Related

Main Form Running A Search On Subform

Sep 20, 2012

I have only 1 table that im 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:

1 Table

ID : Autonumber

ProblemType : Text
Technician : Text

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?

View 1 Replies View Related

Modules & VBA :: Input Box Search - Find A Record In Main Form

Jun 5, 2014

Input box Search problem. I have been using the following to find a record in my frmMain using an Input Box:

Private Sub cmdClientIdSearch_Click()
'Searches for Client by ID number
Dim rs As Object
Dim strCriteria As String
strCriteria = InputBox("Please enter Client ID" & vbCr & "Do not type leading zeros")

[Code] ....

It works great if I run it from a command button from frmMain. But, if frmMain is open and I run it from a command button on my switchboard, I get the following error message:

Run Time error 7951. You entered an expression that has an invalid reference to the Recordset Clone Property. I tried inserting a command to open frmMain in the first line, even before the two Dim statements, but I get the same result.

View 6 Replies View Related

How To Search Sub Form Records From Main Form?

Nov 12, 2006

The situation is like this:

I am designing a db for a dental clinic. I created 3 tables as follows:

1.T_Patients (P_Code(PK) and other fields)
2.T_Diagnosis (P_Code(Fk), ToothRecId (PK) and 32 text fields for 32 tooth named (UR1 to UR8, UL1- UL8 for Upper left / right Arch and LR1 to LR8, LL1 to LL8 for Lower left / right Arch)
3.T_Pmts (P_Code (FK), PmtRecId(PK) and other fields

I created one main form based on T_Patients tbl and similarly another 2 forms from other 2 tables. In the main form I placed 1 sub-form and 2nd sub-form. Bothe the sub-forms are Master / Child relationship on form over P_Code field in the main form.

Single character length has used for all the 32 text fields in table T_Diagnosis. So only one single B, C, D, F, M could be entered.

Normally we search patient’s profile by patient’s code or by name that displays in the main form. But the client needs to search patient’s record by tooth criteria.

There may many tooth fields in the first sub-form that are null and only some of them with any one of the B, C, D, F, M character. Bcz there is very rare chances of damaging all 32 tooth of the patient.

Now my clients want to search based on the data which are B, C, D, F, M characters. Means once he types C (stands for Cavity) in a search text box then it should bring all the sub-form records that hold value C in any of the 32 fields.

1.How can I do this when the search based on SUB-FORM and not over the main form?
2.The entered criteria value might by in other field also. Like say if entered C then this value may be in any of the 32 fields. So how it would bring all records?

I am confused how to do it. I attached a pic of my form for your ready ref. :confused:

I would really appreciate if somebody could help me.

With kind regards,
Ashfaque

View 3 Replies View Related

Modules & VBA :: Unable To Search A String Within Subform To Find Information Stored On Main Form

Dec 2, 2013

I'm trying to search a for string within a subform to find information stored on the mainform to which the particular subform belongs.

The problem is that the subform is generated from a query which uses a number from the main form to generate.

So the subform record is only generated when the correct mainform record associated with it is loaded.

Now to solve my problem I've made a new query that brings up ALL the results that could be generated by the main form and from that I can search to find my search term I'm after and read off the ID number to tie it back to the mainform.

But all of this is done manually, I want a way to do all this using VBA in a way that the user can't edit any records as they are doing it.

View 3 Replies View Related

Adding All Selection To A Combo Box On Search Form

Jun 5, 2014

I have a search form with unbound combo boxes that uses the combo box values as criteria for a query. The Row Source of cboCategory is based on the query:

SELECT Categories.ID, Categories.Category FROM Categories ORDER BY Categories.Category;

When I start the form and I don't select a value for the cboCategory combo box, the query just returns all the values. This is great. The problem is that if I make a selection in the combo box, I have no way of reverting it back to that initial value that would make the query return all categories - if I erase the combo box the query returns nothing. So I have to close the form and reopen it.

I tried adding an "All" value to the combobox like so:

SELECT Categories.ID, Categories.Category FROM Categories UNION Select Null as AllChoice , "(All)" as Bogus From Categories
ORDER BY Categories.Category;

but it does not seem to work. It just returns nothing instead of all the categories. How can I add a value of "All" to the combo box that will return all of the categories?

View 8 Replies View Related

Adding A Msgbox To A Search Form - Easy Peasy Except For Me :)

Sep 11, 2005

I have a code for a free text search form which will return records in another window when the search button is clicked.


CODE
Private Sub cmdSearch_Click()

If Len(cboSearchField) = 0 Or IsNull(cboSearchField) = True Then
MsgBox "You must select a field to search."

ElseIf Len(txtSearchString) = 0 Or IsNull(txtSearchString) = True Then
MsgBox "You must enter a search string."

Else
'Generate search criteria
GCriteria = cboSearchField.Value & " LIKE '*" & txtSearchString & "*'"

'Filter frmRhinitis based on search criteria
Form_frmRhinitis.RecordSource = "select * from tblBaseline where " & GCriteria
Form_frmRhinitis.Caption = "Customers (" & cboSearchField.Value & " contains '*" & txtSearchString & "*')"

MsgBox "Results have been filtered."


End If

End Sub





However, even if no records match the criteria the window will return a "Results have been filtered" but return a blank form. How do I include code that will return a "Match cannot be found" MsgBox if the search string isnt found?


Thanks :)

View 3 Replies View Related

Forms :: Search Combo Box To Search For A Field On Form

May 7, 2013

I have a search combo box to search for a field on my form. But it just goes to that particular record. The combo box is for client id and it has more than one record. How can I have it return just the records pertaining to the client id choosen in the combo box.

View 5 Replies View Related

Database With A Main Menu Form Containing A Button That Loads Main Data Entry Form

Jun 24, 2015

I have a database with a Main Menu Form, containing a Button that loads my main data entry form. When the Button is Clicked portions of the data entry form that is loading shows through the Main Form Background (e.g. portions of the navigation bars, and portions of the boarder on the form that is loading.)

View 5 Replies View Related

Adding Help Files To Option

Apr 5, 2008

Hi there, really simple question

I just wanted to know if I could edit the access interface so that the access help options would not be displayed, but I can add a link to my own created HTML help files for the system I have created. Is it possible?

View 1 Replies View Related

Why Is Main Form Update Event Triggered When Subform Dirties Main Form?

Dec 1, 2005

I have a subform which makes a change to a field on the main form. When focus is returned to the main form, the BeforeUpdate and AfterUpdate events fire. Why? I thought from the form's perspective, the subform is just another control.

BTW, I get the same behavior if I modify the field from within the Exit event of the subform control.

In either case, the main form's Dirty event is NOT triggered.

View 2 Replies View Related

Adding Calender Option To Access

Jun 29, 2006

my departments seems to want to add some sort of notification feature to our database. It's supposed to notify the department when a certain date is approaching.

How do you even begin to think about adding this feature into Access? I don't know where to start. I'm no Access guru. :confused:

View 1 Replies View Related

Adding List Option Automatically

Aug 7, 2006

This is probably something already talked about, but if i have a combo box that has an "Add New Entry" selection in it, and when the user clicks on it, i want to add what they want in to the table that the combo box chooses from. can I have that "Add New Entry" selection open a form with a text box, and then have that value enter into the table? What is the easiest way to do this?

View 3 Replies View Related

Forms :: Option To Open One Or Other Form?

Dec 24, 2014

how to give the option to open either forma or formb with a command button.

View 1 Replies View Related

Forms :: Web Form Option Groups

May 13, 2013

How to create a Web Form and include an option group (5 or 6 radio or check boxes)? I really need the page to layout all of the options (not in a drop down). This will allow users compare answers on the fly looking at the form.

View 2 Replies View Related

Forms :: Default Property / Using A Control Of Main Form Without Using Names Of Forms?

Nov 8, 2013

In the default property of a subform control I want to use a control of the main form without using names of forms, but using me and parent.

I used in default property of cboVATDetail: =Me.Parent!cboVAT, but it is not accepted. My aim is to use cboVAT of parent as default in cboVATDetail of child.

View 3 Replies View Related

Problem With A Search Option

Sep 26, 2005

I have a big problem with a db I am trying to do. It needs to hold info on the patients (fname,lname,phone,add&blood type). It needs to be able to do a search by the blood type and the lname. I did the sql coding. Although I am stuck on the lname search thing. The biggest problem is the design... This will be used by actual nurses, so it needs to be simpler than simple. Just a window that pops up and a field where they can stick the thing they wanna search and results. I am so very lost and bordering depressed... Pls someone help

View 1 Replies View Related

Option Group To Search

May 24, 2006

Hello All

Talk about frustrating and I am sure the answer will be easy for some.

I have a Main form with search criteria and a subform with the data. See the attached image for the layout. The data comes from a query.

I have a yes/no field called "CompletedP" that I want to use to search on. This field is to filter in/out completed jobs. The Frame is called the generic name "Frame60". I am using an option group with the choice of yes or no plus other search criteria using combo boxes. The combo box filtering is fine but the option box does not appear to form any part of the search. To search I select any of the boxes and select "Search".

I post the code here.

Any assistance would be very much appreciated.

Private Sub cmdSearch_Click()
On Error Resume Next
Dim strFilterSQL As String
Dim sSql As String
Dim sCriteria As String
sCriteria = "WHERE 1=1 "


'This code is for a specific search where you will need to enter the exact string
'The source for this code can either be from a table or query
If Me![Location] <> "" Then
sCriteria = sCriteria & " AND qrySearchCriteriaSub6.Location = """ & Location & """"
End If

If Me![Code] <> "" Then
sCriteria = sCriteria & " AND qrySearchCriteriaSub6.Code like """ & Code & "*"""
End If

If Me![ClientCode] <> "" Then
sCriteria = sCriteria & " AND qrySearchCriteriaSub6.ClientCode Like """ & ClientCode & "*"""
End If

If Me![ProjectCode] <> "" Then
sCriteria = sCriteria & " AND qrySearchCriteriaSub6.ProjectCode = """ & ProjectCode & """"
End If

If Me![StartDate] <> "" And EndDate <> "" Then
sCriteria = sCriteria & " AND qrySearchCriteriaSub6.DateAllocated between #" & Format(StartDate, "dd-mmm-yyyy") & "# and #" & Format(EndDate, "dd-mmm-yyyy") & "#"
End If

Select Case Me.Frame60.Value
Case 1
strFilterSQL = sSql & " Where [CompletedP] = -1;"
Case 2
strFilterSQL = sSql & " Where [CompletedP] = 0;"
Case Else
strFilterSQL = sSql & ";"
End Select

If Nz(DCount("*", "qrySearchCriteriaSub6", Right(sCriteria, Len(sCriteria) - 14)), 0) > 0 Then
sSql = "SELECT DISTINCT [JobID],[Location],[Premises Details],[ProjectCode],[Code],[ClientCode],[DateAllocated],[CompletedP],[FileNumber] from qrySearchCriteriaSub6 " & sCriteria
Forms![frmSearchCriteriaMain6]![frmSearchCriteriaSub6].Form.RecordSource = sSql
Forms![frmSearchCriteriaMain6]![frmSearchCriteriaSub6].Form.Requery
Else
MsgBox "The search failed find any records" & vbCr & vbCr & _
"that matches your search criteria?", vbOKOnly + vbQuestion, "Search Record"
End If


End Sub

View 2 Replies View Related







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