Problem Displaying Search Result

Dec 16, 2005

Hi all,

First timer here, so please forgive any daftness on my part. I'm a novice to access setting up my first database. This forun has been brilliant and helped me a great deal. However despite lots of searching I've not been able to sort out this problem.
I have a Form (New Client Details) with a primary key (ClientID), bound to a table (Client Details) and a Subform (Episode of Care Subform1) with a primary key (EpisodeofCareID) bound to another table (Episode of Care). They have a Master/Child link e.g. a client can have multiple episodes of care.
Using a search method I found on this forum I have created a search form (Client Search) which searches on First Name, Surname and Date of Birth. The search is operated by a command button (CmdSearch) with results shown in a Listbox (SelectSearchClientInfo). So the list could contain a number of entries for the same client if they have had multiple episodes of care.This works fine, however I also wanted to be able to select from the list and display all details for that selected record on the 'New Client Details' Form. I've used code found on this site but when I run it the form opens but will only display the first record for that particuler client. This is the code I've tried.
Can anyone help me out and show me whay I'm doing wrong?

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "New Client Details"
stLinkCriteria = "[ClientID]LIKE" & "'*'&" & "'" & Me.[ClientID] & "'" & "&'*'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.OpenForm stDocName, , , "[ClientID] = " & [Forms]![Client Search]![SelectSearchClientInfo], , acDialog

Many Thanks, This is such a good site!!

John

View Replies


ADVERTISEMENT

Count On Query And Displaying Result On A Switchboard

Jul 31, 2006

Hi Folks

More questions from the newbie :eek:

I have a very simple table with a field that will have only the values open or closed

I created a query based on this table and used the count function (to count open or closed cases) and in the next querie field I used the group by open.

This gives me a count of all open cases

I can do the same for closed cases.

I want this count to be displayed on a Switchboard form but i cant get my nehad round how to get it there.

Can anyone help me out ?

Many thanks

Jimmy

View 6 Replies View Related

Forms :: Displaying Result Of A Calculation In A Form

Jun 17, 2015

I am creating a driving school database and have four different tables. Student, Instructor, Lesson and Lesson Type.

In the footer of my subform which works out what lesson type the student has taken and from which instructor, I have created a calculation to multiply the number of hours a student does to what type of lesson they take.

=([LengthOfLesson]*[cost]) (This works ok)

I then want to add all of these options together. I have tried:

=sum([OverallTotal]) in the footer (This doesn't seem to work)

and then

=[Booking].[Form]![OverallTotal] to show it in the form

The name of the subform is correct (booking) and name OverallTotal is also correct but I keep getting #error message.

View 3 Replies View Related

Queries :: Displaying Only 1 Result In A Query Column?

Jun 2, 2013

1 I have a delivery method column and I want to only show 1 type for each method. How would I do that? Is it in expression builder?

View 1 Replies View Related

Queries :: Displaying Query Result In Textbox On Form

May 19, 2013

Have a query which looks up an address using the text input into a textbox by the user.

What I'm now struggling with is getting the query result into the textbox.

Am still new to access and am hoping this is something fairly simple.

View 2 Replies View Related

General :: Textbox Displaying Result Of Sum Function In Scientific Notation

Apr 3, 2014

I am maintaining an Access 2003 application that is running on Windows 7 64Bit Enterprise OS setup.

I have a form in the application that displays a number of records with each record having a unique id and a field called ClockHrs which is stored as a Number (Long Integer) type.

I have a textbox that displays the sum of the ClockHrs field.

The textbox contains no code behind.

The Control source property of the textbox is set to '= SUM([ClockHrs])'

ClockHrs
10
10
30
15
10
15
25
===
115

The textbox displays the result of the sum 115 in scientific notation as 1.15 +02 .

View 3 Replies View Related

Use Search Qry Result For Something Else

Jul 27, 2007

hi :D
here is my question:

i have a table (tblmembers) with member data (name, last name) etc.
i found how to run a search qry with parameters to ask for name, last name.

i have another table (tblrelationships) with 3 fields
2 for member id's and 1 for the type of relationship they have

i need to run the search query for the member by name (from tblmembers) and use his member id (from the member table) to add it to a new record in the relationship table (tblrelationships).

when i run the search qry, i only get as the result the fields with the member information..
thanks

View 7 Replies View Related

Highlight Key Search Result

Jun 3, 2012

How to I can Highlight key search result.

View 14 Replies View Related

Search Forms - Problem With Displaying

Oct 18, 2005

Database description

I have one to many relationships between tables related with PersonID. From the entry forms I enter data and there is another form to search data. The data search form displays some 5 fields from different tables: first name, last name, phone, email...

Problem description
When I enter new data in all the above named fields, then the search engine can find and display the new record. However, when I leave blank some of the fields, let's say, the phone field, then the search does not display the entire row, although the first and last name, for example, exist in the appropriate table.

I would appreciate, if anyone could help me to solve the problem.

Thanks

View 1 Replies View Related

Search Result Based On The First Letter Of A Field

Sep 29, 2006

Hello,

I need to create a query that will seach through a column and only return a result with product codes starting with A.

An example of a product code is AA0000034567.... however there is no realy consistancy. Some start with the AA and some don't. Some have 5 zeros before the numbers start others may only have 1, 2, 3, or 4 zeros before the number.... There are approx 76,000 product codes in total.

My end goal is to create a query to find all the records that have a product code starting with A so that I can eventually delete the AA00000 portion of the code and strip the number back to the point where the 34567 starts.

I figured that by separating out the product codes that start with AA would be a good start.

If any one has any suggestions please let me know.

Peter Vav

View 4 Replies View Related

Access Search Form And Result In A Subform

Feb 11, 2004

Hi,

I have a problem to make a search form in access, I want to divise my form, at the top will be the search criter (8 fields) and in details section will appear the result. I use a continuous subform with a query on the searched fields.
But I can't actualise or open the subform with the new results.
I would like a button to start my search or a system to automatically show the result on AfterUpdate event.

Can you help me, please? i trying to solve this for a long time...

Thank you,

Mrflo

View 13 Replies View Related

Forms :: Copy Search Result Into Textbox

Aug 5, 2013

I have a quote form that has a button which opens a simple search form with just one textbox which gives the results in a subform. (the search is for the company name and the subform results give the company name with the full address (company, add1, add2, town, county, postcode)

I would like to have a button on the search form, to copy the correct result into a textbox on the quote.Until now I have just had a cmbox on the quote with the companies and addresses listed. Unfortunately, the users are not checking this list to see if the company already exists and are adding a new company but with slightly different information, so I am getting multi companies. (i.e, smith ltd, smith limited, or Hants, Hampshire etc).

I need a button on the main search form that copies the company name from the search results subform and copies it into a textbox on the quote.I have tried this on a button but it doesn't like it:

Forms![quotes test].[company].Value = Me![COMBINED SEARCH subform].[company name]

View 1 Replies View Related

Displaying Search Results Using Subform Or Other Control

Feb 23, 2006

Hi, I'm just wondering if it's possible to display the result of a query on a subform which does not have a relationship with any other table.

What I'm doing is creating a search form where a query is built from the users input (through combo boxes and text boxes) of what table, attribute and condition they want to search from. When they press the search button, I want the result to be displayed in a datasheet below the selection criteria

The first thing I thought of using to display information with was a subform, but I think the purpose of having the subform is so that it can be linked with a form. So, is there another control or way of displaying results. The results can come from any table.

Thanks.

sugoi_kat

View 1 Replies View Related

Queries :: Search With Multiple Fields Result From Query

Dec 26, 2013

I want to make a form which will allow me to get data from a query and search using 3 fields parallel.

Attached the database in 2010 format.

Password of the db is "nolimit".

The query PTM & Equipment should be bound with the form and

If I enter month, PTM and equipment need rest 2 fields displayed.

Like choosing the above 3 fields from the drop down , the next 2 text box should display the rest two fields.

View 3 Replies View Related

Tables :: Search Through Every Record And Return Result In Table

Jan 21, 2014

My boss has a form based on a rather large table with a lot of records/fields and she wants to be able to have a field where she can enter something and it will seach every record in the table and return the results in a table. How do I do this?

View 9 Replies View Related

Queries :: Displaying Entire Contents Of Search Results?

Dec 8, 2013

I'm trying to make a search form that makes use of queries that search a table based on what fields I have. How would I go about having the query display all the fields for the record(s) that match the search criteria? This is for Access 2010.

As far as the query is set up, I have several fields with a search criteria, and the others are for displaying the relevant information about the results (since they're not search criteria, I used "Like '*'"). When I ran the query, it doesn't come up with anything - even if the record actually exists in the table with specified criteria.

View 9 Replies View Related

Forms :: Search Form Did Not Return All Data Records For That Particular Result Set

Jun 3, 2013

All using access 2010. Here's the situation. I built a searchform according to datapigtechnologies video. Used a query with criterias on fields i want to search on the form: ex.

Code:
Like [frm]![frmMyform]![MyField]

It worked fine i thought until i ran the same query outside the form without the criteria field. I filtered the query for the same result and the one used on the search form did not return all data records for that particular result set. Ex. on the searchform; I select the fields I wanted to filter then ran the query. I come up with only 9 records when it should be 18 I get with running the exact same query without the criteria and manually filter the results.

View 13 Replies View Related

Queries :: Return Result When Enter Month As Search Criteria

Jun 15, 2015

I cannot get my query to return result when I enter the month of "June" as search criteria. June is listed in the table and query, every other month is returned except June.

I have attached two example for your reference.

View 9 Replies View Related

Queries :: Search Box Result - Add Up List Of Dates That Match A Criteria

Jun 13, 2013

I am trying to add up a list of dates that match a criteria... a search box result.

I have tried DCount, and now I'm doing it through SQL, and no matter what combinations I try I still get an error - usually 3075 - Syntax error (missing operator)

But I can't find anything missing - I copy the SQL into a query view and it works perfectly... but it won't work on its own. And I've tried using DCount with the query as a query object, and I get the same error.

Code:
Dim ResultCount As Long
Dim DateSearch As Date
Dim MyDate As String
Dim MyDateAdd As Date
Dim varReturnValue As Variant

[Code] .....

I've used the >= And < option as it solves an issue with Date Time. What operator is missing!?

View 5 Replies View Related

Search Forms - Finding A Contact And Displaying All Related Info

Nov 22, 2005

Hi

I am pulling my hair out with what I am sure is a simple task, creating a search form that, when criteria are entered, finds a record and displays related data/results from 3 tables. I have tried every forum and web post I can find but I think there must be something fundamental I'm neglecting to grasp.

Quick background:
My database has 4 tables, Firm, Contacts, Mailout and FileNote
The database is contact-centric (ie, everything is linked to a contact record, multiple contacts are held against firms, mutiple file notes are held against a contact, contacts can be attached to multiple mailouts)
I need to search for a contact record based on multiple criteria (keeping it simple, lets say a combination of first_name & last_name OR first-name & firm_name OR their specific contact ID)
I need a 'results form' (not just a datasheet view) that displays all information related to that contact (i.e. all files notes + ability to create new ones, firm contact information, and mailout history)


I've created a Main form with Firm, Mailout, Contact & Filenote subforms embedded that enables me to scroll through every contact and view all related detail (as above) and add file notes & modify data very nicely. My problem is I can't search, I can only move through each record sequentially. Very handy when we have 4000 contacts!

I realise I'm probably a complete wally but could someone please explain to me the vital steps I'm missing? I've tried unbound fields, I've built SQL queries & command buttons (but results are dumped into a datasheet)....I'm lost.

Many many thanks.

View 2 Replies View Related

Search Record In Other Table And Show Result On Current Table

Apr 11, 2012

Actually I have a small form of customer details, that i made in excel, the field name mention below,

Customer Details Table
First Name
Last Name
Contact Detail
Address Detail

Postal Code
Last Purchasing Date
Remark

Now i want to make a search form like this

Search Form

Contact Details

& the result is show which I insert the contact number.......

View 1 Replies View Related

Queries :: Conditional Query To Post Result In Field And Filter Result Records?

Mar 5, 2014

I am working with Access 2010, on vista. What I have is a query made up of two tables, one product the other inventory. (see below) query.jpg

In the product table i have a field called "minimum reorder level". In the inventory table i have two fields one called "number in stock" and "number on order". What i want to happen is "number on order" to be filtered by the result, if the "number in stock", is less than "minimum reorder level", if it is, have the result placed in the "number on order" field. EG. if the "number in stock" = 2 and the "minimum reorder level" = 5 then 3 would be placed in the field "number on order" and only the second record from the query would be visible (see below) Query result.jpg The result of this would mean that the field "number on order" would be populated with the result and the and query would also use this to filter the record.

View 1 Replies View Related

General :: Adding Count To Result Of Query Depending On Month And Result

Aug 18, 2013

I want to add a number to my results within a query depending on the month and how many results. For example I have 10 results in my query 3 from January, 5 from March and the rest from April. The 3 from January would be 1,2,3. The five in March would be 1,2,3,4,5 and so on. Is it possible to do?

I'm using access 2003.

View 4 Replies View Related

Queries :: If There Is No Result In Query Need To Have Default Result Zero

Oct 12, 2013

I there is no result in query, I need the default result zero in my form field. I only use query wizard to create queries.

View 5 Replies View Related

If The Result Of A - B &lt; 30 Than This Result Will Flash

May 29, 2007

All:
I'd like to make the result of my text box flash (in my form) if the its value is less than 30..For example. If A - B < 30, then the result whatever it is as long as it is less than 30..Is this possible in Access? thanks in advance.. :

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







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