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 Replies


ADVERTISEMENT

Form Filter Combo - Msgbox When User Tries To Enter Data

Jun 1, 2012

I use filter Combo boxes in a lot of places so that users can filter records easily. (Not combo boxes for input).I have them labeled as filters but nonetheless users keep trying to input into them for some reason.How would I add a message box to it so that it states that 'this box is not for data entry etc'.

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

Put Records Returned In A Variable

May 17, 2005

I can get the number of records to be returned but I want to run a condition if the records returned is zero. To do this, I need to put the number returned into a variable but I haven't been find a way.

For instance, this code does work:

SQL = "SELECT Count(*) AS Records FROM Table1 GROUP BY Table1.Quantity HAVING (((Table1.Quantity)=4));"
conDatabase.Execute SQL

But I want to store the count as a variable. What I want is something that look this (it doesn't work but I just want to give an idea what I'm looking for)

SQL = "SELECT Count(*) AS Records FROM Table1 GROUP BY Table1.Quantity HAVING (((Table1.Quantity)=4));"
Dim hold as Integer
hold = conDatabase.Execute SQL

If(hold = 0) Then
'tell them nothing returned
End If



So how can I go about this?

Update: I see that someone posted a solution a few threads down using queries which did work. Can I still still do the same thing with SQL strings?

scratch

View 2 Replies View Related

Baffled By No Records Returned???

Aug 21, 2007

I'm using a very basic query

SELECT DRAWING_desc
FROM Drawing
WHERE DRAWING_desc Like '%L%'

I've got a table called Drawing, and a column in that table called Drawing_desc

I want all records returned that have the letter "L" in them.

When I run this query, I get nothing

If I replace the '%L%' with "*" it returns all records like you'd think it would.

What gives?

View 8 Replies View Related

Null Records Not Being Returned

Dec 5, 2004

I am trying to create a Membership report that shows member activity over several months.

My problem is that the software that gives me the Member Activity does not report on accounts that were not used during that month
and some members do not come in every month.

I have a Member's Details table as well as individual months activity and have queries set to show the results of each month individually (these work, obviously)

The Reports I am trying to get from Access only show the activity of Members that have some movement every month, but totally skips members that are not present for 1 or more.

The report uses these queries but fails to report any member that is not in the tables for all months.

Example:

September
Rank Member FirstName LastName Activity
1 100 Andy Todd 200

October
Rank Member FirstName LastName Activity

November
Rank Member FirstName LastName Activity
5 100 Andy Todd 50

The report needs to show: Member FirstName LastName Sept.Rank Sept.Activity Oct.Rank Oct.Activity Nov.Rank Nov.Activity
but will not because there are no values for that member in October.

I am teaching myself Access as I go, so I am sure there is an easy solution.

Any help greatly appreciated.

Andy

View 1 Replies View Related

Null Not Allowed, User Friendly Msgbox

Jul 27, 2005

I have a table field where Null is not allowed, how do I use a user freindly message to tell the user to add data to this field. When a user tries to leave the field Null (ie by tabbing out), they get a message, "tried to assign NUl value to vaiarble which is not variant datatype.

What I want to appear is more like "Please enter a name" or some other custom message.

Any ideas - I have tried before anfd aftyer update events and vaidation rule on the form field of Not Null, but the underlying message always appears first.

Paul

View 3 Replies View Related

Counting #of Records Returned In A Query

Aug 20, 2004

i have a query that returns anywhere between 0-20ish records, and i need an efficient way to count how many records are returned. any ideas?



i was also wondering if there is a more efficient way to do this:


Code: [Text127] = DLookup("[Comments]", "orderheaderz", "[OrderNumber] = " & GlOrderNumber)[Text175] = DLookup("[Performed]", "orderheaderz", "[OrderNumber] = " & GlOrderNumber)[Text177] = DLookup("[Model]", "orderheaderz", "[OrderNumber] = " & GlOrderNumber)[Text179] = DLookup("[Serial]", "orderheaderz", "[OrderNumber] = " & GlOrderNumber)[Text181] = DLookup("[System]", "orderheaderz", "[OrderNumber] = " & GlOrderNumber)[Text183] = DLookup("[HComments]", "orderheaderz", "[OrderNumber] = " & GlOrderNumber)[Text201] = DLookup("[Labor]", "orderheaderz", "[OrderNumber] = " & GlOrderNumber)

mabey i could condense them into one Dlookup somehow? any ideas?

thnx for your help

View 3 Replies View Related

Count Number Of Records Returned From Query

May 15, 2005

Hi,
I would like to count the number of records returned from a query, but am unsure how to do this using VBA.

Any help appreciated.

Thanks

View 4 Replies View Related

Counting The Number Of Records Returned In A Query

Aug 24, 2004

Hello all. I need some help calculating the total number of records returned in a query anytime i run the query.

I have a form that creates an SQL statement and changes the querydef at runtime and displays the results in a listbox. I want to include on my form a percentage of the total records from the table based on the records returned in the query Ex. (5/10) so I can use this information on a report.

What I am trying to ultimately acheive is to calculate an attrition rate based on the number of (clients that leave in a given period / total new clients added in the given period )

thanks for your help!

tony-t

View 1 Replies View Related

Modules & VBA :: Get Msgbox To Let User Enter Data In Specific Text Boxes

Jun 17, 2014

i want to get a msgbox to let the user enter the data in specific text boxes so they can't let it empty if not empty then do..this is my code

If Me.Client_Name.Value = "" Then
MSG = MsgBox("You Should Enter The Client Name")
ElseIf Me.Username.Value = "" Then
MSG = MsgBox("You Should Enter The UserName")
ElseIf Me.Address.Value = "" Then
MSG = MsgBox("You Should Enter The Address")

[code]....

the msgboxes that tell the user this textbox is empty is not appearing what's wrong with my code

View 3 Replies View Related

Reports :: Show Number Of Records Returned In Parameter Query

Mar 9, 2013

I am trying to use Dcount to find the number of records in a query and put it on a text box in the header of a report. The query is a parameter query. The button opens a form which asks for start and end dates, the query reads those dates from the form and the report displays the correct number of records that fall within the date range. The query is based on another query, which is based on the table. I tried =dcount("*","qryName") but I get #error. Maybe becauase of dates? or parameters?

Access 2010, Windows 7

View 3 Replies View Related

Forms :: How To Get Subform To Grow Or Shrink Based On Number Of Records Returned

Aug 4, 2014

All; using 2010. How can I get a subform to grow or shrink based on num of records returned? Its a continuous subform. Tried changing Vertical and Horizontal Anchors as well as some VBA suggestions but havent been able to make any of them work.

View 2 Replies View Related

No Records Msgbox Stopped Working

Oct 5, 2006

I am calling a continous form from a combo box on another form. The code below used to warn me that there were no records and shut the form down to avoid showing a blank form.

Private Sub Form_Load()

If IsNull(Me.TxtUnit) Then
MsgBox "There are no operations recorded for this Unit", vbOKOnly, "No Recorded Operations"
DoCmd.Close
End If

End Sub


All was working fine until I changed the properties of the continous form to "Allow Additions = No" to remove the spare blank line at the bottom of the records (just for neatness really).
Now, if there are no records to display, the Me.TxtUnit is not Null anymore. It does not seem to exist. If I hover the mouse over it (in VBA) I get no response at all.

How can I get my Msgbox back please ?

Oscar

View 2 Replies View Related

Modules & VBA :: Possible For A Msgbox To List All Records Where A Field Equal To Value?

May 18, 2015

So I have a form for addresses that checks against a table of US zip codes, and throws up a warning if the City/State/Zip entered isn't found on the table. This works great. But I was wondering if there was a way to list the available combinations based on the zip code entered. I want the program to tell the user that the city is wrong, but here is a list of what it could be.Is it possible for a msgbox to list all records where a field = value?

View 11 Replies View Related

Modules & VBA :: Filter Records - Adding Unbound Date Listbox To Filter String

Feb 10, 2014

I'm trying to hash two scripts I've found into 1 functioning filter, however I'm still relatively new to vba and can't figure out how to get this working.

I'm trying to use Allen Browne's Search Criteria:

with another snippete of code I found here:

Code:
'Purpose: This module illustrates how to create a search form, _
where the user can enter as many or few criteria as they wish, _
and results are shown one per line.

[Code]....

It's the date part I'm having trouble with, the rest of the search criteria work fine without the date, but I can't get it working when I try to modify and merge the date sections of each code.

Also I'm using a listbox for the "Yesterday";"Last 4 days";"Last 9 days" and not a combo box.

View 2 Replies View Related

How To Create Filter Button On Form And Filter Records

Nov 26, 2012

How can I create a "Filter Button" on a form and filter my records? I create a textbox on a form and a filter button on the right. Then I click the filter futton, the filter function will search/match the content in the box through the datasheet. And then the results of the filtering will be pop up on the split form datasheet.

View 3 Replies View Related

General :: Filter By User

Oct 15, 2013

I have a database that opens into a continuous form ... which has records and a user name in each, which is taken from a table "ASSIGNED". At the foot of the continuous form I put a filter button to show only the selected user records.That when opening the form, Access asks why I want to filter user (do this only once) ... So each user sees only their records.It is clear that the "Front End" is used in a network and is linked to another database with multiple related tables.

View 1 Replies View Related

Creating User Form Filter

Aug 2, 2005

Hi can anyone help me. I need to create a form filter that will allow a user to enter an amount into a text box and then run the filter to match the amount entered. I have tried creating a macro that will execute this but it wont work. any ideas?

Thanks

View 2 Replies View Related

Forms :: Apply Filter To Form And Allow User To Do Edits

Jan 10, 2015

I'm creating a database about Vets and I need to make a button on my menu form that will open something like message box that will allow me to type in something (in my case Customer ID) which will then apply the filter on the customer form and allow me to do edits. I have only done the macro that will open the customer form but can't figure out how to do the filter part.

View 2 Replies View Related

MS Access Date Filter Based On User Input?

Dec 12, 2011

I have query in MS access which does date filter based on value given by user.

SELECT *
FROM Table1
WHERE ((DateValue([Table1].[Date_col])
Between "#"&[Forms]![Frm1]![Date1]&"#"
and "#"&[Forms]![Frm1]![Date2]&"#"))

But this gives empty output

View 1 Replies View Related

Field Criteria: Is Null; There Are Null Values In That Field; No Records Are Returned

Nov 16, 2007

I think the title pretty much sums it up....

I have a query where data is first sorted by user input; first field's criteria: [fieldname], then by another field's criteria: Is Null.

I know there are records containing null values in the second field, as I have run a select query with the criteria: Like "*", to make sure they are null, and not zero-length-strings.

The query is refusing to return any results...

Any ideas?

View 10 Replies View Related

Modules & VBA :: Filter A Report Based On Two User Inputted Dates?

Oct 23, 2014

I am trying to filter a report based on two user inputted dates, but can't seem to figure it out. I've played around with quotation marks, and # but can't seem to figure the syntax out.

Code:
Me.OrderBy = "Date Submitted"
Me.OrderByOn = True
Dim Date1 As Date
Dim Date2 As Date
Date1 = UserInput
Date2 = UserInput
DoCmd.ApplyFilter WhereCondition:="[Date Submitted] > Date1 and < Date2"

View 11 Replies View Related

Form Doesn't Filter On Load If User Has Restricted Access

Jul 27, 2012

I have a report that has a link to open a a form "ProjectDetailsActive" to a specific record ID from the report. It works.

I have 3 subsets of users who have restricted access to the form "Project Details Active". By that I mean that when they open this form, it hides and rearranges some tabs, and disables certain controls. If a user from one of these 3 subsets tries to open the link to a specific record in the form, it does not work. The form opens to the first record available instead of the selected record. This is only a problem for these 3 user groups. For users who do not fall into these 3 groups, the filter works.

This is the only code in the form that does the restriction, but I don't know where the process is going wrong.

Code:
Private Sub Form_Current()
LoadBudgetPage
CancelRsn.Enabled = False
'detect number of line items for current project
Me.lblOrderCount.Caption = GetNumRecords & " line items for this project."

[code].....

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

Need Null Results Returned Also

Jan 16, 2006

I have a query that i run and now I am adding another column to provide a ETA for an order, when i specify a date I only get results that have that date and when I leave out the date I get too many results. Can someone please let me know how I can modify my query so that I get all the results with an ETA and also all the accounts that do not have an order placed.

Thanks,
Scott

View 2 Replies View Related







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