Wierd Sorting Situation (excluding Record)

Jun 29, 2006

I'm trying to sort a combo box alphabetically except for one value which is always at the top of the list.

The row source of the combo box is a query. record to remain at the top of the list is static- same value and ID number always. I've fiddled around with a few things, but at the end of the day, i'm just not smart enough! (or its not possible -which i doubt)..
any suggestions?
cheers.

View Replies


ADVERTISEMENT

Excluding A Single Specific Record Among Many Records

Sep 13, 2007

Hello Query Expert

Hi I would like to exclude two specific records from my recordset.

For example suppose I have a Flights Database and I want to see all the flight records for Aircrafts 132 and 232 only, between the date jan 1, 2007 to Sep 12, 2007.

The above I know how to do achieve...

([FltNum] = 132 or [FltNum] 232) AND ([FltDate] >= Jan 1, 2007 and [FltDate] <= Sep 12, 2007)

However, among this set of records I want to exclude flight 132 on Aug 1, 2007 and flight 232 on Sept 1, 2007.

([FltNum] = 132 or [FltNum] 232) AND ([FltDate] >= Jan 1, 2007 AND [FltDate] <= Sep 12, 2007) AND NOT ([FltNum]=132 AND [FltDate] = Aug 1, 2007 ) AND NOT ([FltNum]=232 AND [FltDate] = Sep 1, 2007)


I haven't been able to accomplish this using the query grid. Is it possible or do I have to write SQL?

How would you write this in SQL?

Thanks so much.

View 4 Replies View Related

Excluding Multiple Records From Query Based On Value In ONE Record

Sep 27, 2005

Table1 gives Case Nu.

Table2 gives Case Nu. and EventType.

Table3 gives EventType and Cleared (yes/no field)

I want to run a query that gives Case Nu and Event where if there is even one event marked Cleared for a Case, then that case number and its events (even those not marked cleared) don't show up at all.

Any ideas? I know there must be an obvious solution, but my mind is stuck right now!

View 2 Replies View Related

Wierd Stuff..

Oct 25, 2005

Recently I've been having a problem with Access (2003) that I can't seem to get around. If I click on "NEW" to create a new query, do some editing, then go to close, it prompts me as to whether or not I want to save, which would be ok, if it would let me choose NO!!

I only get OK or Cancel options. I've NEVER had this problem before.
I have not done any updates added any addons. Is there some hidden trick here or some way to get around this cause its really annoying.

TIA,
Tim

View 3 Replies View Related

My Situation!

Nov 26, 2005

I am creating a database that tracks reports that are generated from people in the field...The statistics are tracked on a 28 day cycle, beginning on a Monday and ending on a Sunday. Every week the 28 day period loses the first week and gains a week on the end. I need to develop a way to generate the queries for the reports based on a clock that automatically "calculates" the current 28-day period.

View 2 Replies View Related

Wierd Opening Db Problem!

Mar 5, 2008

Hello

I have a database on a shared network drive. If you try to open the db (when another user already has the db open) from the route "my computer" then selecting the drive then selecting the db the message

"Microsoft Access can't find the database file 'M:lah blah blah'
Make sure you have entered the correct file and path name"

However, if you open the db through the access application it opens fine and there are no problems.

Has anyone come accross this before???
I have contacted our IT department who say that they cannot see why this is happening.

Thanks

View 3 Replies View Related

Wierd Date Between Query

Aug 16, 2005

I have a backwards date between query. I have a table with Date1 and Date2 fields. On the form I have a calender control. I want the user to click a date on the calender control and then look at the rows in the table to see if that date is between the Date1 and Date2 fields.

So the query will be (in english) get all rows that CalenderDate1 is between Date1 and Date2

Im stuck. Someone give me direction.

View 11 Replies View Related

Wierd Subform Behavior (Please Help)

Dec 29, 2005

When I open my mainform through an onClick event of a button, the form opens up with the subform on it is disabled/closed -- Just a blank white box shows in place of the subform on my mainform. Here:
http://img426.imageshack.us/img426/4672/shot29sj.th.jpg (http://img426.imageshack.us/my.php?image=shot29sj.jpg)

However, when i go through the objects window and open the mainfrom directly. I am able to enter and update data and the subform shows up and works fine. Here:
http://img420.imageshack.us/img420/5650/shot19ig.th.jpg (http://img420.imageshack.us/my.php?image=shot19ig.jpg)

This is the code attached to the onClick event on the mainMenu

Private Sub New_Project_Click()
On Error GoTo Err_New_Project_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Project Status - Full Details2"

stLinkCriteria = "[projectId]= 0"
DoCmd.OpenForm stDocName, , , stLinkCriteria
[Form_Project Status - Full Details2]![Proj ID].Enabled = False

Exit_New_Project_Click:
Exit Sub

Err_New_Project_Click:
MsgBox Err.Description
Resume Exit_New_Project_Click

End Sub

This is the record source on the mainform:
The projectInfomation table is the record source
SELECT *
FROM projectInformation;

This is the record source on the subform:
The projectStatusCommentary table is the record source

SELECT projectStatusCommentary.projStatusId, projectStatusCommentary.projectId, projectStatusCommentary.statusCommentary, projectStatusCommentary.commentaryDate
FROM projectStatusCommentary;


The link fields are:
projectInformation.projectId
projectStatusCommentary.projectId

The tables are in sybase and my application has an ODBC connection to them.
I can update any of the tables directly without issues.
I have ran the queries independently and updated tables through the query and it works fine also.

I have been pulling my hairs out on this for over 3weeks now. cos i can't seem to find what's wrong.
I am not able to attache the db cos it's very huge. But i have copied the problematic form &subform, to a new db so you may see my design, and record sources.

If you have any suggestions, ideas, or you've come across this kind of issue before, anything...please make my new Year a happy one and help :)
I would really appreciate it!
Have a happy and prosperous new year.

Yours truly,
Frustrated one

View 10 Replies View Related

Wierd Date Picker!!

Oct 12, 2006

Well this is bizzare,
I am using the microsoft date picker in my form. I have made it non editable (i.e. editable=false) when the form loads.

I am making it editable on the click of a button... Seems all so simple huh..

But my problem is that when I click the button, the date picker is displaced at the top of the form..

when I move the slide bar of the form, it again comes back to its original position..

Can anyone explain this?? and how to make it simple?

View 6 Replies View Related

Complex Situation For Me

Jul 22, 2005

Hello all,

I am trying to make a simple inventory control system. This system will only record input of products and output of products. Explanation: This is a catering service company. I buy tomatoes, rice, oinions, Oils, meat, ect. When we buy this products they usaly come in different packages. The rice can come in 100 pound bag, 50 pound bag or just by the pound. The onions can be bought by the bucket, half bucket, dozen, half dozen ect. The oil can be bought by 100 gallon barril, half barril, Gallon, half gallon, pint ect. The meat by the pound.

I am able to make the a simple invoice and PO application, the only problem is that I want to be able to select what type of packaging the product has and the invoice or PO subforms.

I started with a simple product table, I than created a packaging table and a package detail table. This gave me the chance to create a subform on the product form where I can choose what type of packaging this product uses and also tell it how many units the package has.

So far so good. Now I created a Chef table "this is my Chef to whom I give the product to for cooking" I than created an authorization slip table "this is like an invoice table" and ofcourse a authorization detail table "this is where I pick the products that I give the cook" once I print this out the chef will be able to go to the warehouse and retreive the product.

What I want to do in the detail subform is to be able to pick the product and the type of packaging that I am giving them from a dropdown box then it will automaticaly show only the packaging I assinged to that product and give me the units . This way if I pick the type of packaginh name 100 pound it will put 100 units in the quantity field automaticaly.

So basicaly is an invoice form with its detail but on the detail I am able to pick the product and the packaging that I am giving the chef.

Can you guys guide me on the right direction on how to do thsi?

Thansk
DaniBoy

View 1 Replies View Related

Wierd Slow To Open Problem

May 22, 2007

Hi,

I have a database here that is run by users who use either Access 2002 (XP) or Access 2003.

I have noticed something which to me seems odd and dunno if any of you guys could explain why or how to resolve it?

If one of the 2002 users opens the database it opens fine first time (I use 2002 myself for development) however if a 2003 user opens it it can take 30s+ to open, but then if they close it it will re-open in just a couple of seconds like for the 2002 users.

However if a 2002 user opens it once a 2003 user has just closed it they will then take 30s or so to open it, but then again if they close and re-open it's almost instant.

Is that normal?

Incidentally office 2007 doesn't seem to suffer from this, but it's dead slow at running the database anyway so I'm not going down that route for the forseeable future!

Thanks in advance for any input!

I did try the recommended method of searching this forum using google but it didn't seem to work for me:(

View 1 Replies View Related

Inherited This Situation - Regarding Parameters

Feb 7, 2007

Hi. - Please do not lecture me: I inherited this database and it's table designs.

I have multiple tables, each containing a SSN text field and multiple other text fields. There is some overlap in SSNs among tables.

I need to create a report with a subform for each table.

The user would ideally be asked for and enter a specific SSN and a specific string. The result would be the report showing the SSN and each table's field that contains the string.
ie, parameters would be: Specify SSN and for the string would be: Enter TEXT VAUE.
SSNs are simple enough, but the text string entered would need to be, for example: LIKE "2400*"

How do I do this easily so that each text field in each table is searched for that string, without having the user re-enter and re-enter and re-enter... it multiple times?
(I do not know very much VBA, so other ideas?)

Russ

View 3 Replies View Related

Access Vs Excel....which One For This Situation

Jan 2, 2008

A friend of mine who is in real estate is looking to learn about Excel. My knowledge is very limited. I can Conditional Format, IF, VLOOKUP etc but I have no idea what can be done with different Sheets in a file.

For example, in one set of data he has it is details on properties for rent. Sheet1, Sheet2 and Sheet3 are for 1, 2 or 3bedroom properties. I assume if a 4 bedroom property is for rent then Sheet4 would be done.

With Excel how easy (or hard) would it be to link data between the sheets. For example, show the properties where the lease is about to end (or whatever) and whereby properties that met the search criteria would comprise 1, 2 and 3 bedroom units and hence be in all 3 sheets.

If what is in 3 sheets was placed in one sheet can Excel do much with that or are you stuck with data that is spread over what appears to be several acres:D

If you can do this in Excel would you need to learn a lot about Excel. To put it another way, this is very easy for anyone here to do what he wants in Access. However, for someone starting from scratch would Excel allow him to get up to speed and functioning easier and quicker than Access

Thanks for any advice

View 14 Replies View Related

Consolidate 3 Queries Down To 1, Possible In My Situation?

Dec 26, 2006

In order to find the most recent piece of data for a particular customer I need to query my table in 3 iterations.

I have a TABLE with data in it pertaining to all customers.

QUERY 1 orders all the records in TABLE by date.

QUERY 2 plucks all records related to specified customer from QUERY 1.

QUERY 3 selects the TOP 1 from QUERY 2.

My main concern is that this all happens automatically. Can I shorten this process at all?

View 4 Replies View Related

Situation With Similar Strings!

Apr 10, 2008

I have supplier records where the supplier name in each record is different. It may be Supplier ABC, AB,C, ABC!, ABC Inc., or several other variations. In addition each of these suppliers has their own supplier ID. The supplier ID can be one of 5 different versions since the data is from 5 different ERP systems. I am trying to create one table that does not have the supplier listed many times, but has one correct name and one ID that will be able to link back to the original file with all the different names and IDs. I hope this is a good explananation. Any advise?

View 2 Replies View Related

Continuous Form Record Sorting

Mar 17, 2005

I doubt this is possible, but I'll see if anyone out there knows how to do this...

so i have labor entries that consist of a laborID (the guy doing the labor) the serviceID (service being performed) and all the payment info (peripheral, not really important). what i would like to do is add a field, Area, that describes where on the house the labor is being performed, ie the roof, the master bedroom, the kitchen, etc...

is there any way to sort these using continuous forms (maybe 2 continuous forms?) kind of like in a report where it goes, for instance (ignore periods, for spacing only):

Area: Roof
.....Tearoff yadda yadda
.....Replace yadda yadda
Area: Kitchen
.....Redo electrical yadda yadda
.....Replace toaster etc etc
.....Fix plumbing etc etc
Area: Bathroom..... etc

thanks for any ideas...i know this is ridiculous, but i figured i'd give it a shot

View 2 Replies View Related

Help-dont Understand Dlookup In This Situation

Jan 17, 2007

Hi i'm after some time saving advice

i'm writing an Access database to quote for windows & doors,
there are many variants like style, width, height, glass types, security specifications and about 4 other options.

what would be the best way of working out how to add the extras for each option,

The price would be based on the style first, then depending on width and height, then on what options were ticked . i.e securtity spec yes/no, then on what glass type, the price gfor that would be based on the entered width x height etc.

is it possible to do a look up, like you can in Excel where it looks at at grid/matrix based on style number and width x height to get the price, but then how would i get it to add the other options which will depend on size and number of openings.

any help greatfully received.....

View 1 Replies View Related

Displaying Only One Field In Report - But Unique Situation

Feb 12, 2007

Hi. Back again with a badly designed number of tables that I inherited.
Anyway...

I have 20 tables each with an ID field and a dozen-or-so text fields. - (I planned on using a master report with sub-reports, but perhaps I am ahead of myself here.)

I need the user to enter the ID and a value which would only appear in one of the dozen+ fields for that record, in that table.
I set up queries with parameters for the ID and the desired text value.
However, when run, I get the correct client record, but also all of the fields for that record... Not only the field with the desired value.

Is there a 'simple' way to do this knowing ho wmany possible fields froma ll of the tavbles would have to be searched? And not all tables have the same field names!

Russ

View 2 Replies View Related

Wierd Prob: Cannot Update SQL Server Text-fields For Some Records, But Can For Others

Feb 22, 2005

Hello,

I have a very strange problem:

I have a table linked to an SQL Server table in my MS Access 2000 Application containing 5 text-fields (SQL Server Type, in Access seen as MEMO-fields) and several other fields (in total about 140 fields). Updating any field works fine except for some records. In those records I can only edit the non-text-fields in my application. When I try to edit one of the text-fields I get a error message telling me that another user has edited the record and i have to discard my changes.

The strange thing is that this problem only crops up for some records. (1 in a 100 or so) All other records work fine.

Does anyone know what happens here? And how this can be fixed?

Thanks.
Kaine

View 3 Replies View Related

Sorting A Table, Apply The Sorting To A Form

Mar 10, 2006

Hi all.
I've created a database which contains information about stores. I want to have the forms automaticly sorted by the department number.
I've tried to sort the table by department, but when I try to add a department, the sorting doesn't seem to affect the form at all.

Lets say I have department 1,2,3,6,7,8 in the form, and I add department 4, it will be the last post in the form. I want it to be the fourth, and so on..

I'd apreciate some help with this :) Thanks

Here's the database (http://www.access-programmers.co.uk/forums/attachment.php?attachmentid=12934&stc=1&d=1142018915&PHPSESSID=f730b7f11f6983965698faeacbe5a1ee)

View 5 Replies View Related

Excluding Records From A Qry

Feb 28, 2006

Hi All,

I'm trying to extract records that start with 10 but I need to exclude all that start with 1011,1015 & 1025

so far I can only extract records that I need but cant exlude the others when I use the SQL below

INSERT INTO tblConceptOrders ( TA_TASK_ID )
SELECT dbo_F_TASKS.TA_TASK_ID
FROM dbo_F_TASKS
GROUP BY dbo_F_TASKS.TA_TASK_ID
HAVING (((dbo_F_TASKS.TA_TASK_ID) Like "10*"))
ORDER BY dbo_F_TASKS.TA_TASK_ID;


I'm looking for a better way to exclude the records I don't want & collect the ones that I do

Any help will be appreciated

thanks :)

View 6 Replies View Related

Need Help Excluding Records

Feb 13, 2008

Good morning,
I'm trying to create a query and I'm asking for specific records, but also need to exclude certain records within that criteria. Here is my Select statement:

SELECT [MD IMPORT PURGE PEND].PROC,
[MD IMPORT PURGE PEND].SEG,
[MD IMPORT PURGE PEND].NAME,
[MD IMPORT PURGE PEND].GROUP,
[MD IMPORT PURGE PEND].BEN,
[MD IMPORT PURGE PEND].DATE,
[MD IMPORT PURGE PEND].RISK,
[MD IMPORT PURGE PEND].REASON,
[MD IMPORT PURGE PEND].PLAN,
[MD IMPORT PURGE PEND].PAR,
[MD IMPORT PURGE PEND].IND,
[MD IMPORT PURGE PEND].REC,
[MD IMPORT PURGE PEND].SUBNO,
[MD IMPORT PURGE PEND].CLIENT,
[MD IMPORT PURGE PEND].CLAIM,
[MD IMPORT PURGE PEND].FSDT,
[MD IMPORT PURGE PEND].PDDT,
[MD IMPORT PURGE PEND].CHECK,
[MD IMPORT PURGE PEND].PROV,
[MD IMPORT PURGE PEND].SOURCE,
[MD IMPORT PURGE PEND].PAYEE,
[MD IMPORT PURGE PEND].EFF2,
[MD IMPORT PURGE PEND].CSHRCNO,
([CARR] & [CARR1] & [CARR2]) AS CPL,
[MD IMPORT PURGE PEND].CLASS,
[MD IMPORT PURGE PEND].MKTSEG,
[MD IMPORT PURGE PEND].PAID
FROM [MD IMPORT PURGE PEND]

WHERE ((([MD IMPORT PURGE PEND].SEG)="CONTROL") AND
(([MD IMPORT PURGE PEND].REASON)="44" Or ([MD IMPORT PURGE PEND].REASON)="51") AND
(([MD IMPORT PURGE PEND].IND)="HOMES" Or ([MD IMPORT PURGE PEND].IND)="OTHER") AND
(([MD IMPORT PURGE PEND].SOURCE)<>"IN" And ([MD IMPORT PURGE PEND].SOURCE)<>"IP") AND
(([MD IMPORT PURGE PEND].PAYEE)="J" Or ([MD IMPORT PURGE PEND].PAYEE)="N")) OR

((([MD IMPORT PURGE PEND].SEG)="CONTROL") AND
(([MD IMPORT PURGE PEND].REASON)="44" Or ([MD IMPORT PURGE PEND].REASON)="51") AND
(([MD IMPORT PURGE PEND].IND)="HOMES" Or ([MD IMPORT PURGE PEND].IND)="OTHER") AND
(([MD IMPORT PURGE PEND].PAYEE)="S" Or ([MD IMPORT PURGE PEND].PAYEE)="M")) OR

((([MD IMPORT PURGE PEND].SEG)="CONTROL") AND
(([MD IMPORT PURGE PEND].REASON)="35") AND
(([MD IMPORT PURGE PEND].IND)="HOMES" Or ([MD IMPORT PURGE PEND].IND)="OTHER") AND
(([MD IMPORT PURGE PEND].EFF2)="3")) OR

((([MD IMPORT PURGE PEND].SEG)="NASCO-NASCO") AND
(([MD IMPORT PURGE PEND].REASON)="44" Or ([MD IMPORT PURGE PEND].REASON)="51") AND
(([MD IMPORT PURGE PEND].IND)="HOSTP" Or ([MD IMPORT PURGE PEND].IND)="OTHER") AND
(([MD IMPORT PURGE PEND].SOURCE)<>"IN" And ([MD IMPORT PURGE PEND].SOURCE)<>"IP") AND
(([MD IMPORT PURGE PEND].PAYEE)="J" Or ([MD IMPORT PURGE PEND].PAYEE)="N")) OR

((([MD IMPORT PURGE PEND].SEG)="NASCO-NASCO") AND
(([MD IMPORT PURGE PEND].REASON)="44" Or ([MD IMPORT PURGE PEND].REASON)="51") AND
(([MD IMPORT PURGE PEND].IND)="HOSTP" Or ([MD IMPORT PURGE PEND].IND)="OTHER") AND
(([MD IMPORT PURGE PEND].PAYEE)="S" Or ([MD IMPORT PURGE PEND].PAYEE)="M")) OR

((([MD IMPORT PURGE PEND].SEG)="NASCO-NASCO") AND
(([MD IMPORT PURGE PEND].REASON)="35") AND
(([MD IMPORT PURGE PEND].IND)="HOSTP" Or ([MD IMPORT PURGE PEND].IND)="OTHER") AND
(([MD IMPORT PURGE PEND].EFF2)="3")) OR

((([MD IMPORT PURGE PEND].SEG)="PAR") AND
(([MD IMPORT PURGE PEND].REASON)="44" Or ([MD IMPORT PURGE PEND].REASON)="51") AND
(([MD IMPORT PURGE PEND].IND)<>"HOSTS") AND
(([MD IMPORT PURGE PEND].SOURCE)<>"IN" And ([MD IMPORT PURGE PEND].SOURCE)<>"IP") AND
(([MD IMPORT PURGE PEND].PAYEE)="J" Or ([MD IMPORT PURGE PEND].PAYEE)="N")) OR

((([MD IMPORT PURGE PEND].SEG)="PAR") AND
(([MD IMPORT PURGE PEND].REASON)="44" Or ([MD IMPORT PURGE PEND].REASON)="51") AND
(([MD IMPORT PURGE PEND].IND)<>"HOSTS") AND
(([MD IMPORT PURGE PEND].PAYEE)="S" Or ([MD IMPORT PURGE PEND].PAYEE)="M")) OR

((([MD IMPORT PURGE PEND].SEG)="PAR") AND
(([MD IMPORT PURGE PEND].REASON)="35") AND
(([MD IMPORT PURGE PEND].IND)<>"HOSTS") AND
(([MD IMPORT PURGE PEND].EFF2)="3")) OR

((([MD IMPORT PURGE PEND].REASON)<>"35" And ([MD IMPORT PURGE PEND].REASON)<>"44" And ([MD IMPORT PURGE PEND].REASON)<>"51") AND
(([MD IMPORT PURGE PEND].IND)="HOMES") AND
(([MD IMPORT PURGE PEND].CHECK)="000000000") AND
(([MD IMPORT PURGE PEND].PAYEE)="S" Or ([MD IMPORT PURGE PEND].PAYEE)="M") AND
(([MD IMPORT PURGE PEND].EFF2)="3") AND
(([MD IMPORT PURGE PEND].CSHRCNO) Is Null));

The part in bold is the exclusion. I want it to exclude records where the reason is 35 or 44 or 51, IND is HOMES, check number is 000000000, payee is s or m, eff2 is 3 AND cshrcno is null.

Can anyone tell me how to achieve this? I really appreciate your help!

View 4 Replies View Related

Excluding Records If They Appear On Another Table?

Sep 27, 2005

Hello, I'm new to the forum and relatively new to Access. There's something I'm trying to do but I'm not sure if it's even possible so I'm hoping someone can help me out and point me in the right direction

the situation:

I have one very big table containing data for around 250 petrol stations. The data is collected monthly, so each site has a record relating to each month. E.g site A has data for month 1, 2, 3 etc.

The problem is that in any month, some of this data needs to be excluded from analysis. And this will vary over the months. What I want to do is run a query where specific records are excluded, for example, exclude Site A data for month 1 and 3, Site B data for month 2 etc.

I have another table containing a list of which site + month data is bad and to be excluded. Ideally I want to simply add to the list each month before I run the select query.

the question:

Is there any way to exclude records from a select query based on their details appearing on another table?

help would be much appreciated!
thanks
Catherine

View 2 Replies View Related

Excluding Data From A Query

Jul 30, 2006

Could someone please help me? I am trying to run a query in which I would like to exclude a particular person's name from the query. For example, I am entering productivity information for each employee and manager each day, however, I only want the employee information to appear in the reports each day. Is there anyway of excluding a name from a query?

Thanks:)

View 2 Replies View Related

Total Excluding Duplicate

Nov 14, 2007

Dear Friends,

I have one query based on code, rate, quantity. I created field for total (rate x quantity). What expression i can write that the query will calculate total only with the first figure as per code and if code repeats again, should not calculation total.

Please see the following query structure. Thats how i want my total to be calculated.

Code, Rate, Quantity, total
50,100,10,1000
50,100,10
60,200,20,4000
60,200,20
60,200,20
70,200,30,6000

Thanks
mithan

View 7 Replies View Related

Excluding An Entire Table?

Oct 9, 2006

I have one table that will consists of about 1,000 rows. I have another table that consists of product codes that we want to exclude from the report. I know how to include the two tables by joining, but I want to EXCLUDE the 2nd table of product codes. Basically, if any of the product codes listed on table 2 are on table 1, I don't want them to appear. So how can I do an exclude function in a query?

View 3 Replies View Related







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