How To Narrow Down A Search By Two Field's Data

Apr 12, 2013

I am quite new to Access and programming, I have a table with 1,101,203 records, 16 fields. How do I create a form to search by, 'Account number', and narrow down searches for

+/- 10% on price and sq ft.

example:I would search the account number and it would give me;
Account_no: 10140455
Color: White
Etc: Etc
Etc: Etc
Value: 149720
Sq_Ft: 13875

I want to get a list of records displaying +/- 10% of the 'Value' and 'Sq_Ft' I got from the search I made of the 'Account_no'.So when I search 'Account_ no': 10140455 and it gives me that account information(etc, etc, etc, Value and Sq ft), I also want to get a list of records that have +/- 10% of the value and sq ft of the 10140455 record.

View Replies


ADVERTISEMENT

Can Narrow Down To A Specific Word In DLookup?

Jun 17, 2013

I am trying to Dcount in a report agianst a query but I need to narrow down to a specific name within the [Catgory] for example [Category] ='Allowable' How do I fit that into the statement?

=Nz(DCount("[Category]","qryAttendanceHistorybyDept","[Assoc Nm]=Reports!rptAssociateAttendanceHistorybyDept![Assoc Nm]"),0)

View 4 Replies View Related

Modules & VBA :: Using Unbound Dropdown / Text Boxes To Narrow RowSource

Jul 17, 2013

I'm developing a form to link a clause to one of a selection of internal documents from drop down boxes (of which there are a lot and hence looking for ways to make it more manageable to find).Now the setup of the internal documents is unfortunately beyond my control (separate SharePoint Libraries, inconsistent fields, you name it they've picked the worst way to do it :P).

I figure the best way to do this is to set up some unbound controls - two drop down (to narrow down location/department), two text boxes (doc code and name) with the idea that it will limit the selection to anything 'like' what is typed in.What I would like is either: How to set the RowSource criteria to only apply if the relevant control is not blank (i.e. if all the boxes are blank, all docs will show; if 'Sales' is selected in department and the user types 'Sales Order Entry' only the Sales Documents relating to order entry will appear)How to add criteria to the RowSource of a dropdown box via VBA (I've created the relevant 'If then ... else' statements but not sure how to add rowsource criteria in VBA)

View 2 Replies View Related

Lost Data In One Field After Performing A Search

Aug 8, 2015

I have a form frmMember, it has a search button that performs a complex search of fields. after performing my search my [BaseDues] field shows #Name? BaseDues is set by a CBO in the field above.

It works correctly except after the search...

Here is the Code for the Search Button:

Private Sub cmdSearchForm_Click()
On Error GoTo Err_cmdSearchForm_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmSearch"

[Code] .....

View 9 Replies View Related

Using Subform For Search Criteria And Relating One Search Field To Several Columns

Apr 21, 2015

1. I created a form with some search-fields which are related to a query. Then I added a Subform in which I put some more Search criteria (So that I can easily hide and unhide those additional searchfields). It sounds strange but is necessary ;-). Now I related those searchfields in the subform to the same query. When I run that query a window pops up that I should put in a value in all those searchfields which are in the subform. But I told Access that it should display all rows, if there is no value in those searchfields. Just as I did it with the Searchcriteria in the Main form. Do I have to do something special, when I have a query which is related to two Forms?

2. I want a searchfield to search in three different columns. Usually the value will just be found in one of those columns. As the Table I search is very long and has many searchfields and multiple of those will relate to more than one column, is there an easy way to do it in VBA? As I did it by using the "or" field when designing a query, but this seems very slow and unstable.

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

Forms :: Make A Button To Search Range Of Columns In Data Table With Data Type Yes / No

Apr 15, 2013

what I want to do is make a button to search range of columns in data table with data type Yes/no and display the results if the value is yes

View 9 Replies View Related

Forms :: Delete Search Field In Order To Point To Appropriate Field?

May 6, 2013

I am using access 2010. I technically have an unbound form but I am changing the record source by command buttons. Switching between 3 command buttons. My problem is that I have a subform that I was linking to the form to an unbound search field. Now I want to switch the master and child links to a field on the form when I switch the record source which happen to be the same field as the unbound search field; however; it still pulls from the unbound search field rather than the field on the form. Do I need to delete the search field in order to get is to point to the appropriate field?

View 1 Replies View Related

Queries :: Mark Disappear Field Data Based On Field Data Last

Oct 15, 2014

How Mark disappear field data based on field data last.

Example:I have a field type in the name and on behalf of another field No.

In the case of the Type-B data is deleted Number field, which is before the character.

View 1 Replies View Related

Search Memo Field Using Another Field

Nov 8, 2006

I have a database and I need to search in the body of the memo field for information in another tables field. Please help.

table 1
field Driveline
data : 805983D1755

table 2
field memo
data:
Turn on Speedometer Switches:
NO SPDO SWTCHS REQD
C/B D/L = 804248D1795
C/B Location @ 3204.0
ALUM STD 1810 3HOLE 16MM R036-226
X = 47.9
Y = 120.0
Ctr Brg Brkt = K257-223-11
Rear D/L = 805983D1755

View 3 Replies View Related

Search From Not Pulling Up All Data

Oct 1, 2013

I have a query and search form with this critera in each field for: Employee, Job Number etc.

Example: Like "*" & [forms]![F_SearchFormWide]![Job Number] & "*"

If I put in may the first 3 characters of the job it pulls it up but when I put the full number nothing comes up.

Also the DB has 40,000 records. The total at bottom of query is only 16,000.

I have tried verifying my join connections making sure all jobs are pulling from job table, I tried all 3 ways. Why its not pulling up all my records.

View 5 Replies View Related

How Search Within A Field

Jul 19, 2006

i have created an asset database for a school. i have made a query that search for a room but say, for example, i want to find the record for "room 32" the user has to put "room 32" in the search box. is there anyway for example if the user types "32" that the record will be found?

any help much appriciated :)

View 3 Replies View Related

Search In Certain Field

Jun 6, 2005

I want to built in an search button on the form in order to find records with the desired value in a certain field of the record. the caption of the textbox I want to search in is "NombreSTL" and the code below doesn´t work. whats wrong? thanks in advance...

Private Sub search1_Click()
On Error GoTo Err_search1_Click
Dim strWhere As String
strWhere = "NombreSTL"

Screen.strWhere.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70

Exit_search1_Click:
Exit Sub

Err_search1_Click:
MsgBox Err.Description
Resume Exit_search1_Click

End Sub

View 2 Replies View Related

Trying To Search A Field

Oct 15, 2006

I am trying to copile an herbal database. I have a form in which I enter the information on each herb. One field is "medicinal uses" and I list all of the uses of the herb.

Okay, so how do I get it to list all of the herbs that have a medicinal use of "cramps" or "sedative". It won't find them because it is looking for the whole list of medicinal uses, not an individual use. Is there a better way to do this, or does the program not do what I want?

-Joy

View 1 Replies View Related

Search Button In A Data Page

Nov 21, 2005

I have the database and the Data page, but how do I add a search button to the data page to search the database by a certain field? Any help would be appreciated. I would be happy to send you the files if you give me a contact.

Thanks

View 2 Replies View Related

Parse Data Then Search For Delimiter

Sep 10, 2007

Here is what I need to do:
I have 1 table that contains groups responsibilities, there is a field Code-group that the initiator uses to track the groups & their % of impact to the overall project hours. Sadly enough he enters the data as such (EX:
PROJECT1 GROUP1-25%, GROUP2-50%, GROUP3-25%.

The problem is that he has varied instances of groups listed in each record & wants me to be able to parse the data out regardless of how many groups are listed. I know how to parse data when there are a specific number of groups what I can't figure out is how to parse data regardless of how many groups is in the field.

Any help is totally appreciated.

Phoenix

View 4 Replies View Related

Search And Data Entry Forms

May 23, 2006

Hi all
I reread this and it was way to long. What I want to do is use a combo box to list values from a table field, when an option is selected, the rest of the fields update. Not sure what I have to do to achieve this. Any advise would be welcome.
Regards
Craig

View 2 Replies View Related

Entering Data Using ComboBox For Search.

Nov 17, 2006

Hello,

Below is the main data entry form of my application. We disrtibute a product called MC Cloth to Shops to display. After a month we visit again and take stock of products sold, replenish and the shop pays for the products sold.
the Database keeps a record of the shop, products displayed, refilled, sold and respective payments.

The dtabase and the form is loaded in Handheld (PDAs) by the sales people who enter data during the visit and then synchronise with a master on return


http://affiliatesexcel.com/MC_main_form.jpg

I need to sum up values in one field for example MC Refill from the first record till the new record and show it in another field, for example MC Refill Total

Another Forum answer to my question about summing up values in one field to be used as default in a second field showed that a search needs to be done based on base field (in this case NAME of customer).

However since I use a COMBO BOX to enter this NAME field values and then select it from a pull down list to create new records, I have this value ONLY in the very first Record. All subsequent records have all other values where as the NAME value remain empty.


NameCust_IDRecordNumAddress
whs01ggggggggg
02qqqqqqq
03mmmmm
04nnnnnnnnn
05ooooooo
06pppppp
Kickstart08xyz
09898989898
012mmp
013qty

This makes the search function impossible based on the NAME value.
As a solution I would like to AUTOMATICALLY copy the NAME value to a second field (for example CUST_ID) during creation of each NEW RECORD so that I can then base my search on this field instead of the Name field (with empty values)


Currently I have the code below which works correctly for entering NEW Data and for recalling by Pull Down .
(I have tried a mehod which entered the values for
all records but this clutter up the Pull down with SAME
Name for repeated records making the PULL DOWN unusable.)

I have tried to copy the Name value to Cust_ID value for each new record but the code gives an error.

+++++++++++
Code:

Private Sub Name_Combo_AfterUpdate()
' This procedure tries to find the matching product's record.
' If the matching record is found, the procedure goes to it.
' If the record isn't found, the focus stays on the current record.

Dim Criteria As String ' This is the argument to the FindFirst method.
Dim MyRS As Recordset ' Recordset used to search.
Dim ComboName As String ' The name of the company to search for.
Const IDYES = 6

Set MyRS = Me.RecordsetClone
' Build the criteria.
ComboName = Chr$(34) & Screen.ActiveControl & Chr$(34)
Criteria = "[Name]=" & ComboName
' Perform the search.

MyRS.FindLast Criteria
If MyRS.NoMatch Then

Response = MsgBox("Could not find the Supplier Name: " & ComboName & " Do you wish to register a New Supplier: " & ComboName & " in this Database?", 4 + 48)
If Response = IDYES Then
MyRS.AddNew ' Create new record.
MyRS("Name") = Screen.ActiveControl
MyRS.Update ' Save changes.
MyRS.Move 0, MyRS.LastModified ' Go to new record
Me.Bookmark = MyRS.Bookmark ' Go to new record
Else
GoTo Endsub
End If
Else
MyRS.AddNew ' Create new record.
MyRS("Name") = Screen.ActiveControl
MyRS("Cust_ID") = MyRS("Name")
MyRS.Update ' Save changes.
MyRS.Move 0, MyRS.LastModified ' Go to new record
Me.Bookmark = MyRS.Bookmark ' Go to new record

'Me.Bookmark = MyRS.Bookmark

Dim recNo As Long

' for this to work there cannot be any RecordNumber with a value of 0
' it finds the highest record number for the name in the combo box
' and returns 0 and exits if no record found.
recNo = Nz(DMax("[RecordNum]", "Miracle_Cloth_Main", "[Cust_ID]='" & Me.Cust_ID & "'"), 0)
Debug.Print "RecordNo: " & recNo & " and Name: '" & Me.Name_Combo & "'"
If recNo = 0 Then
Exit Sub
End If
Me.Text90.SetFocus
DoCmd.FindRecord "'" & recNo & "'", acAnywhere, , acSearchAll, , acCurrent


End If
Endsub:
MyRS.Close


End Sub

+++++++++++++++++++++++
The question is is there an easier way to
achieve the summing function ?

Any help is greatly appreciated as always.

--------------------------------------------------------------------------------

View 14 Replies View Related

Search In An Access Data Page

Sep 6, 2007

Hi i have a small problem that i hope you maybe able to answer.

I have creted an access data page, which works ok. However i really would like the option to search on a certain field to lookup a record. Is this possible?

I understand that there are filter options, but i need to define just one field, for one record.

The nature of this database is to store info on batches we produce, therefor it's important i can search via a batch number.

Is this possible?

View 1 Replies View Related

Search A Designated Field

Oct 20, 2006

Hey gang,
Is there a way to click on the find record button and have it automaticly search from a specific field? The only way I know how to search a field in a form is to select the field and then click on search. I just wanted it to automaticly select a field.
Thanks gang, have a great weekend.
PuJo

View 1 Replies View Related

Search Part Of Name Field

Jul 23, 2005

Hi Guys!

I'm working on this database in which I have 2 forms:

one form has personal information (PersonalInfo)
and the other one is a search form (Search)

In the search form I have a field in which I want to type any part of the Name field in PersonalInfo form and I want to retrieve all the records that have this part of the name.

Here is what I tried:

In the PersonalInfo form, I want to the criteria of the NameField and typed the following:

Like %[Forms]![Search]![SearchField]%

but it didn't work.

Any help will be very much appreciated.

Regards,
CS.

View 4 Replies View Related

Search Criteria Within Same Field

Aug 10, 2006

Hi All,


I need to make a search criteria within the same field,
for example here 'Demo' should selected from 'xxx' to 'xxx' number.

Thanks for reading, any suggestion would be appreciated

good day :-)

View 4 Replies View Related

Search All Field In The Table

Jan 25, 2007

Hi everybody,
How I can set a query to search in all table fields. In my table I have around 48 fields and I want to search for particular value from combo box if this value exists in any of those fields.

View 2 Replies View Related

Search Field In A Form?

Aug 12, 2005

Hi, i was wondering how can i make a field that does search on a form linked to a database?

if anyone can help asap it would be really great

View 1 Replies View Related

How To Create A Pop-up Search Field

Dec 21, 2005

I have an extremely large database which is in a continuous form format, and what I would like to happen is, instead of using the find button that would just find a word, I would like to have a pop-up search box that would yield actual texts throughout the DB (something like the search feature in Adobe Acrobat). In addition, I would like to use the "and" or "plus" together to search for additional data if needed. Please, unless there is a sample I could download and use in my db, please be specific in your instructions since I am new to all this.

Thanks!!

View 1 Replies View Related

Search Field Error With ' In Name

Mar 2, 2006

I have a search form, generally it runs fine...until now. When the record contains a ' in it, I get an error. For example, I can search on last name Smith fine, but unable to search on O'Malley.

I get runtime error 3075
Syntax error (missing operator) in query expression 'lstnam LIKE 'O*M*' AND fstnam LIKE 'g*'

It works with other characters, like ? or . or !, just not the apostrophe '.

Any help would be great.

Here is the code I have for the search button.
Private Sub cmdSearch_Click()

Dim LSQL As String
Dim LSearchString As String
Dim LSearchString1 As String

If Len(txtSearchString) = 0 Or IsNull(txtSearchString) = True Then
MsgBox "Please enter a last name."
End If
If Len(txtSearchstring1) = 0 Or IsNull(txtSearchstring1) = True Then
MsgBox "Please enter a first name or portion of the first name"

Else

LSearchString = txtSearchString
LSearchString1 = txtSearchstring1

'Filter results based on search string
LSQL = "select * from tblTEMPMEM"
LSQL = LSQL & " where lstnam LIKE ' " & LSearchString & "*'" & " AND fstnam LIKE '" & LSearchString1 & "*'" & ""

Form_frmGroups_sub1.RecordSource = LSQL

lblTitle.Caption = "Member Details: Filtered by '" & LSearchString & " , " & LSearchString1 & "'"

'Clear search string
txtSearchString = ""
txtSearchstring1 = ""

MsgBox "Results have been filtered. All names containing " & LSearchString & "."



Thanks!

View 4 Replies View Related







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