Promting User For A Value And Then Using That To Search For Records

Nov 9, 2006

I have records in a table that contain many fields 3 of which are text fields that I use for storing a year eg 2002,2003 etc. A record may only have a value in the 1st text field whereas other recods may have values in 2 or all 3 text fields. The problem I have is I want to select records that have the same year in any one of the text fields. For example:

Record 1 may have text fields containing: 2002, 2003, 2004
Record 2 may have text fields containing: 2003, 2004, 2005
Record 3 may have text fields containing: 2002
Record 4 may have text fields containing: 2002, 2004, 2006
Record 5 may have text fields containing: 2006, 2007

In the query I want the user to enter one year value using the prompt [Please enter required year] eg 2004 and for the query to then select records that contain that year value in any of the text fields. In this example records 1, 2 and 4 would be selected. If the user entered 2007 only record 5 would be selected. How do I do this?

Grateful for any help!

View Replies


ADVERTISEMENT

Promting User

Jul 26, 2005

Hi

I am putting together an Inventory database.

I have a couple of parameter queries for searching by name and then loaction. I would like to remind the user of the "correct names" of the four possible locations they can type into the query dialogue box...how do I go about this?

Thanks

View 2 Replies View Related

VBA - Search Button To Search Entire Records / Runtime Error 3345

Jun 18, 2014

why the code below is not functioning properly. When I type in an acronym in the textbox, it keeps saying there is an error "Run-time error '3345': Unkown or invalid field reference 'ABO'." I do have ABO in the field.

The dysfunctional code:

Code:
Private Sub btnFind_Click()
If (TxtFind & vbNullString) = vbNullString Then Exit Sub
Dim rs As DAO.Recordset
Set rs = Me.RecordsetClone
rs.FindFirst "[Acronym] = " & TxtFind

[Code] .....

The red highlighted line is where the debugger leads me to. Something with identifying the field? I would like to enable the search procedure to search throughout the entire records rather than just a specific field. How may I write such a line or two?

View 5 Replies View Related

User Definied Search Criteria

Dec 6, 2007

I'm setting up a customer database. I'm used to using ASP to query and manipulate data within databases, but this time the database is to run on friends work laptop and he wants it accessed directly using access.

Basically, in the sql statement to get it to search for a whole string i simply put

WHERE tblCustomers.CompanyName=[Enter Company Name]

However, he wants to be able to just enter the first few letters of the company name, and get results based on that. Is this possible from a query or within a form?

I did also try an OnUpdate which read as follows:

View 9 Replies View Related

Multiple User Specified Parameters For Search Query?

Mar 30, 2006

Hello

I have created a database for my department to log all of our jobs to keep track of them and I want to create a simple search for them but I am having difficulties.

I am familiar with creating queries to search tables for matching records, but is it possible to get search criteria from the user (ideally from a search form they fill in) to form the query?

For example, I would like the user to be able to query the jobs by month and/or business area and/or supplier...is this possible?:confused:

Any help gratefully received!!!
:)

View 2 Replies View Related

User Input To Search Database And Create Report

Sep 9, 2004

I have a database that I created that uses a form to fill out information about server builds. I contains information about who built it, the IP address, server name, etc. I want to be able to create a dailog box that allows the user to input a server name to query the database and create a report based on that input. And if the user input isn't found in the database, a dialog box comes up with some sort of error message. I am still pretty new to Access, so the more detail you can give me the better. Thank a lot.

View 1 Replies View Related

General :: Combo Box Does Not Expand And Search As User Type In

Jun 30, 2015

MS ACCESS 2010
AutoExpand Property Set to Yes

I have a bound combo box that has a query as a row source, The query has 3 fields called from tblMasterItems, The ItemID , ItemDesc and ItemSupplier(related to the PK of tblSupplier).

Column Count = 3
Column Width = 0";1";0"

If I do not put a criteria under ItemSupplier, the combo box behaves just fine. The problem happens when I set the criteria under ItemSupplier, the criteria being the supplier ID, the combo box no longer expands and searches as you type, but the items in the combo box have been filtered and are there.

Summary:

When the row source qry ItemSupplier Field does not have a criteria, cbo works just fine.
When the row source qry ItemSupplier has a criteria, cbo no longer expands and searches as you type, but has the filtered data showing if you hit the expand button (that arrow pointing down in the cbo)

View 6 Replies View Related

Calc User Totals Table 1 And Enter In User Records In Table 2

Oct 28, 2004

I have two tables. The first contains details of a budget holders money allocation for a given period, and the other tracks their spend on products over that period. How can I generate a query to calculate the total running spend for each user from the "budget spend table" that will be written into the users record in the "budget allocation table".

My aim is to show details of budget allocation, total spend to date and remaining budget for each user in an Order form / report.

Can anyone please advise me on how to do this or suggest another way of doing it. Any help would be greatly appreciated.

Thanks in advance.

Regards Peter

View 5 Replies View Related

Using Form Data In User-Entered Query Search Criteria

Dec 20, 2006

I am attempting my first access database which tracks blood components in our medical facility. When a component is issued to a patient there is a button to push which links to a report that runs a query. The user must enter the unique key for the component at a promt, which ensures the report generated will be for that component only. My question is if there is a way to cpture and use that key automatically when pressing the button. If I need to clarify something, please let me know--I may not have the Access developer lingo down yet...

View 2 Replies View Related

Modules & VBA :: Search 1 Field Based On Multiple User Input

Jul 4, 2013

I have a search form that looks up a value in a field and lets the user know if it is there or not, they have now asked to put in multiple values to search... eg. searching containers number, I will put user input box where they can put these numbers

NYKU023561
TRLU102356
TCNU123023

This will search my container number field and show a pop up message box saying..
Please note below
NYKU023561 - has been found you cannot use this container
TRLU102356 - has not been found please check internal system
TCNU123023 - has beeen found you cannot use this container

Below is the basic search I had before which was all I needed.. how can I adapt this?

Code:
Private Sub Command256_Click()
If (CntSearch & vbNullString) = vbNullString Then Exit Sub
Dim rs As DAO.Recordset
Dim CNT As String

[Code]....

View 4 Replies View Related

Placing User-Defined Search Parameters In Report Header

Apr 11, 2014

I created a Access 2010 database query to allow a user to search a list of orders between 2 dates, and I created a form for them to use for this search.

Then I created a report for the search results to land on. What I want to do is have the 2 dates that the user provided be displayed in the header of the report.

I created a new Text Box and placed it in the header. In place of the "Unbound" filler that was there, I placed

"=[Forms]![frm_DateRange]![txtStart]".

I used the following steps to do this:

Clicked on the Text Box controlPressed the "Property Sheet" buttonSelected the "Data" TabPressed the "..." button next to the "Control Source EntryThe "Expression Builder" came upDouble-clicked on the database name in the "Expression Elements" windowDouble-clicked on "Forms", then double-clicked on "All Forms"Selected the rpt_DateRange" formSelected "txtStart" from the "Expression Categories" window.I did not select anything in the "Expression Values" window.

When I go to "Report View", and see the Text Box I added, but inside it, it just says "#Name?"

View 7 Replies View Related

Reports :: Search Results Report Shows All Database Records / Not Just Search Results

Apr 29, 2014

I have built a custom search form in a MS Access 2010 database so that users can find specific records to edit. After entering the search criteria and hitting a Search button, another form opens up that shows the search results. This second form includes a command button for generating a report of the search results.

Right now, the custom search form and the search results form are both working properly, but the search results report is showing every record in the database instead of just the search results. This is true whether I access the report via the command button in the form or the navigation pane. I'm not sure if I need to correct my VBA code or the report's properties.

View 4 Replies View Related

Allocating Records Per User

Oct 4, 2007

Anyone any ideas, please?

I have a table of name and address data as a back end and have put a front end of each of 12 "user" computers on a workgroup-based small network. Each user can look at on twelfth of records, the range being specified in a query on each front end PC, which, of course, means that each front end has to be slightly different.

I wonder if it's possible to assign some sort of owner system so that whenever "user1" logs on he/she gets the first twelfth of the records, user2 gets the next set and so on.

As a separate issue, can I somehow work out the start and end records needed for each user by automatically dividing the total number of records by 12 (since the master table can have a different number of records each time we get new data). At the moment I am calculating (using Excel) and inserting the ">1200 <2400" for each user.

Any ideas would be gratefully appreciated.

View 1 Replies View Related

Prevent User From Seeing Other Records

Apr 7, 2008

I have a form, that once prompted, finds a certain record for the user. How do I prevent the user from being able to see any other records but that one, once the form is opened? The user needs to be able to edit the particular record they opened, without viewing or editing any other records in the database. Is there a way to hide the bar at the bottom of the form that allows users to manipulate through the different records?

View 6 Replies View Related

What Is The Best Way To Search For Records?

Mar 15, 2006

Hi there


This may seem to be a very general question for some but im wanting to find out what the best possible way of filtering records?
I have a database that structurally is split up into 2 tables. The one table refers to primary address information and the other table with the more detailed table. These two tables are linked as one-to-many. Theres also about 20,000 records to my db.

When i use the advanced sort filter in Access my address table is the primary table im allowed to search by, not any of the secondary table fields.

Is there a way around this or should i be using other recordset or filtering techniques?

Does anyone know the code to use the advanced sort filter function, rather than going into the records tab in access?

Any comments to put me in the right direction greatly appreciated

cheers

View 1 Replies View Related

Search Records

Nov 5, 2007

Hello All,

I have a form that I want to search Criteria that is "Like" the data entered. So if I am looking for "VA11336", the user may enter "11336" it will pull that record up (VA11336) and any other records that are "Like" what is entered. Possibly with a "find next" to browse other records. I am not sure how to make the query do this......I tried

Like [Which Site #?] in the query but I know this is not right...

Any Ideas?

Thanks

View 1 Replies View Related

Randomly Pick Records For Each User

Feb 23, 2007

I have a query with a list of Customer SSNs and Claim Rep, I want to randomly pick 5 Customer SSNs for each of the Claim Rep.
I can't figure out on how to do that, I was able to create an SQL code to just randomly pick the customer SSN.
I don't know anything about Visual Basic codes, but if that is the only solution, please go ahead post it.
Thank you very much in advanced.

View 4 Replies View Related

Prevent The User From Editing Records

May 8, 2005

Hey guys..

is there any way in which i can prevent the user operating a form from adding or deleting or editing any records ?

View 10 Replies View Related

Filter By Records Assigned To User

Jul 23, 2012

I'm trying to create a table that shows only records assigned to the user based on their environ("username"). I tried creating a code that adds the user name to a table, but this won't work as multiple people will be using the database at once.

View 2 Replies View Related

Search All Records For A Given Month

Jan 11, 2007

Hi All,

I was wondering how would you search all records by a given month. What criteria would you put in the date field?

View 12 Replies View Related

Using Form To Search Records

Jul 4, 2006

Hello Friends,
I had a problem with my database although the problem is very easy because I am out of touch I am not able to solve it. I am attaching my databases along with this thread.
I want that if the user enter First, Last or Inumber in a text field in the Form "search". After pressing the button ‘search’ a the form ‘search_results’ opens and displays all data records that match to the entered parameters.
By clicking on the data record the form ‘candidate’ opens with this specific record and the form ‘search_results’ is closed.
I would be happy if someone help me.
Thanks

View 1 Replies View Related

ListBox Search Records

Jan 7, 2005

Having an excruciatingly hard time seting up a txtBox and listBox to search records



ListBox, which contains an agency name should display all but filter out as user types in the textBox above. this listbox should allow a user to double-click to bring up record.



Will really appreciate the help! I have seen it being done on Access – and was wondering if anyone knows of a link or tip on setting this up!



ThankYou Friends!

View 1 Replies View Related

Search Scrollable Records

Oct 31, 2006

On a form I have an scrollable listing of all records in my database, alphabetized by last name. There are alot of records so I would like to have a 'Search' text box -- that is, I would like to be able to type letters of the last name in the 'Search' text box and as each letter is typed I would like to see the records scroll to the first "last name' that starts with the text I have typed so far.
Any ideas ... Thanks ahead of time!

View 2 Replies View Related

Restrict User Access To Specific Records

Oct 12, 2005

I have a staff database in my office which holds, amongst other things a list of staff holiday taken. Presently the staff have no access to view holidays because they will also be able to view other employees details. What I need to do is enable members of staff to see their own holiday, but no others and Im really not sure how to go about it.

I have a workgroup in place; so each user has their own login/password.

Any ideas would be gratefully received.

Thanks,
Adam.

View 3 Replies View Related

How To Lock Records To Prevent User Editing?

Feb 6, 2008

Good morning! I'm building a database for use by four technicians in a call-center type operation. The call records are purely transactional in nature -- once the call has been logged, the record is closed. If the customer calls again, a new record is opened.

The supervisor doesn't want the techs to be able to go back and edit a record once it's entered -- the records are for quality-control purposes and he doesn't want them gaming the system by going back and changing things after the initial call is logged (let's not discuss the issue of employee psychology, motivation, Office Space, etc.). So I'm trying to figure out how to do that; they all have wheel mice, and I can currently see all the records as I scroll back and forward with my mouse wheel, so I'm assuming they'll be able to, as well.

Any help?

Thanks,
Andreas

View 11 Replies View Related

No Records From A Filter Returned, Want Msgbox To Tell The User So

Sep 23, 2005

Okay, I have a unbound form with three combo boxes the selection of these three & then clicking of a filter button opens the relevant form showing records based on the selection. Great that bit working, no major feat.

Trouble is when I select three criterea in the combo boxes that no record(s)exist for and hit the filter button. A blank form appears not very friendly or appealing.

what I'm after is a simple, thats me all over by the way, of a message box appearing to tell the user no records where found.

Any ideas, starters for ten on this one?

:cool:

View 3 Replies View Related







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