Advanced Sort/filter

May 4, 2005

I am using a handheld scanner to scan in barcodes. However the part numbers contain more data than I need. Is there a way to get ride of the extra data I scan in in Access.

Say I have part ABCD- 7G675 .. I only need 7g675 to be in the field. Is there a way to do this besides a find replace, that would take way to long.

View Replies


ADVERTISEMENT

Sort AND Filter

Aug 4, 2005

I have some very simple code on a button on a form to sorts my data by company name. But as some of my data is for friends, I want to be able to add a line in that looks at the "Category" field and only includes those that are a "business". Can I do this.....?? So some sort of filter.

Private Sub Command43_Click()
On Error GoTo Err_Command43_Click

Me.OrderBy = "CompanyName"
Me.OrderByOn = True

Exit_Command43_Click:
Exit Sub

Err_Command43_Click:
MsgBox Err.Description
Resume Exit_Command43_Click
End Sub

View 2 Replies View Related

Forms :: Filter And Sort Using Custom Buttons

Sep 24, 2013

I am using Microsoft Access 2010. It provides great filtering and sorting options in the ribbon for any object. But what if I hide the ribbon and want to create custom buttons on the form to do the filtering and sorting job? There are some filter options available in macros but are not quite like the ribbon's own Filter button. When the Filter button is clicked from the Robbin, a filter menu pops-up under the active field, which doesn't happen when I try to do it using Macro functions like "Apply Filter" or "Set Filter" etc. I want to have that big "FILTER" button from the Ribbon on my form.

View 2 Replies View Related

Modules & VBA :: Xml To Create A Ribbon For Sort And Filter

Dec 27, 2013

I use the following xml to create a ribbon for Sort and Filter

Code:

<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon startFromScratch="true">
<tabs>
<tab idMso="TabCreate" visible="false" />
<tab id="dbSearchtab" label="Sort and Filter" visible="true">
<group id="SearchScreenSort" label="Sort and Filter">

[code]....

The first problem is that this ribbon appears in forms where it is not included.The second problem is that in addition to the "File and Filter" tab, there appears a "File" tab Whe you click on it is goes backstage allowing you to Print and Exit.

View 2 Replies View Related

Modules & VBA :: Sort / Filter Dropdown Being Disabled?

May 2, 2015

I'm using a dropdown that has the months of the year in it. The user selects a month and the form is then filtered by a date if its the first of whatever month is selected. It works fine but when the filter is applied I cant select the little arrow on the column headings and select the boxes (Select All, Blank, ETC...). It doesn't work on any column, just the apply text filter works but I cant select anything.

It works fine when I clear out the filters on the form. I tried to use vba to set the menusetting property to true and that didn't work either.

View 1 Replies View Related

Filter/ Sort Query To Eliminate Duplicate Fields

Apr 6, 2006

Basically i have a mortgage application system which im running a query on to see which applications have been completed in the last week or period up to now ie. last week, last month, last 3 months.

basically each application or CaseID has one or more applicants. The majority of them have two applicants. A few have one.

Problem is when i run this query which shows me: - CaseID, CLIENTNAME, LENDER, PRODUCT, MORTGAGE RATE, LOAN AMOUNT -

it brings up these fields but i only want one occurence of each CaseID????

CaseID Forenames Surnames PRODUCT RATEDateCompletedLoan required
2821NothandoDube71116.6920/01/2004£63k
2821Sipho Dube 711 16.69 20/01/2004 £63k
2909Hobbly Chise 726 15.69 31/01/2002 £164k

Get the picture? Both Sipho and Nothando are applicants on the same mortgage but i only want to show one name. Anybody know how to help me out???

Ive taken up this existing system, so i think there's possibly a normalisation problem thats causing this. But i need a quick fix for now rather than redesign the whole system.

View 2 Replies View Related

Modules & VBA :: Sort Ascending And Descending And Filter Continuous Form

Mar 6, 2015

I'm trying to sort and filter a continuous form. Sort ascending and filters works perfectly fine. But my descending button doesn't work. I basically have a combo box which contains a field list. Then two buttons (asc. and desc.), then a text box for filter, a button to filter, and another button to reset filter. Here's my code:

Code:
Private Sub cmdAscending_Click()
If IsNull(Me.cboField) Then
MsgBox "Please choose a field.", vbOKOnly, "No field to sort."
Else
Me.OrderBy = Me.cboField
Me.OrderByOn = True

[Code] ....

View 8 Replies View Related

Forms :: Possible To Sort Filter Column Without Subform Record Source Being A Query?

Apr 24, 2014

I have a form that shows multiple rows of linked/child records.The form in question is the "frmFilterNumberTypeView" form. When a particular filter is used (installed on an automobile), I would like to be able to click on the corresponding "Installed 1" button left of the filter number, so that by code, I can reduce the Qty on Hand by One, and insert the corresponding filter ID to the History table, along with the date/time the filter was used.

how to reduce the Qty on Hand, nor how to do the updates to the History table, I'll figure that out myself over the next week or two (hopefully it won't take that long). What I'm trying to figure out here is how I can associate the red "Installed 1" button with the filter to the right of whichever button I press.

how to sort the filter column on this same form. I'm fairly certain that this would be very easy to do if the subform in question was populated by means of a corresponding query, but I'm afraid that if I go that route that I'll spend another 20+ hours trying to figure out how to get the proper filter records to match the filter manufacturer, not to mention having to next figure out how to link the table so that if I modify any particular filter record, that I'll be able to have the associated table update accordingly.

Is it possible to sort the filter column without the subform record source being a query?

View 2 Replies View Related

Forms :: Form That Shows 100 Records At A Time - Filter / Sort Data Source Entirely

Oct 20, 2014

The recordsource is a query with over 6,000 records. The form currently lists the records in datasheet format with header and footer for things like buttons and filtering. The client wants to be able to go from page to page of the souce query, showing 100 records on the form at a time.

But at the same time, they should be able to filter or sort the data source in it's entirety. The person who created the form came up with what seems like an awful solution to the problem. It seems to use a random number generator to determine how many records to portray at a time. I see this in the code as well as in operation, because the number of records on page to page varies. It doesn't even start out at 100! Worse yet, using a sort on the page only sorts the records that are visible.

View 9 Replies View Related

Forms :: Applying Sort And Filter In Form Results In Design Changes To Form

Dec 27, 2014

When I'm applying a sort and filter in a form, Access is updating the Filter and Order By properties of the form, so that it is possible to re-use in conjunction with Filter on Load and Order By on Load properties. However, a consequence of this is that when the form is closed, it prompts the user whether they want to save the design of the form. I want to circumvent this as I don't want to re-use the sort and filter and I don't want to be prompted to save the design of the form.

Although I can circumvent this by closing the form using a method that doesn't prompt for saving, the additional complication here is that the form in question is in the Navigation subform of a Navigation Control. Hence when I click on a another Navigation button, it (not me) closes my current form and hence prompts me whether I want to save the design of the form (if I have been sorting and/or filtering). I can't see how to circumvent this and the prompting is resulting in unacceptable usability.

View 2 Replies View Related

Advanced Customization

Feb 2, 2008

This should be a piece of cake for someone with a few experience years on me. I have a client for which I am building a custom database. They use this for various reasons. One main reason is to track man hours, cost, billing information on a per job/customer basis.

Each of their customers has a unique contract. Which specifies the information required in order to bill the customer for a job. For example: Customer "Big Factory" requires PO# and Job#.

The contract also specifies the billing rate for each piece of equipment and each type of employee. For example: For customer "Big Factory" again, we charge $10 a day for a pickup truck and $20 an hour for a welder. Customer "Little Factory" has a different contract with different rates and required fields.

*Now I have all of the above under control (in my opinion)*

Following is part is where I struggle. Each contract also specifies which hours (on a daily basis) are standard work hours and which are premium work hours, as well as, at what point (# of weekly hours) to start billing only premium hours during the remaining part of the week. For example: "Big Factory" Standard hours are from 07:00 to 17:00, Premium are from 17:00 to 07:00, Weekly premium start once an employee has worked 40 hours for that week regardless if the employee has worked some hours for another client(*Exceptions do exist where the employee must work 40 hours for the client before the weekly premium kicks in*).

I need this to automatically calculate for each employee. It must update each time sheet that the employee exists on.

Currently I have it working in a rather unorthodox way, but it isn't exactly scalable to work for each customer's unique contract. I can post how I have it, but it will be quite a long post. It has to do with a running sum query then a make table query then an update query.

One other caveat: My client pays their employees premium pay on a 40 hour work week (>40 per week is premium time) regardless of which hours they work. (Seems like they are ripping the employees off I know). I posted this once before, but had received only a negative post chewing me out for not being fair. Anyway...

If presented with this how would you do it?

Any help is greatly appreciated.
Thanks,
Eric

View 6 Replies View Related

Advanced Search Box

Dec 27, 2005

I want to make something similar to the Google search box, although not quite as complicated.

I would like to be able to type more than one word in a search box.
I am only searching on 1 field [Title]. The query would show all the records with the first search word in the Title, plus all the records with the second search word in the Title.

I have a query now that has the below in the Title field criteria:
Like "*" & [forms]![Searchform]![searchcontrol] & "*"

This searches for the word typed into the searchcontrol no matter where the word is in the title. It works great, but I can only type in one word at a time.

View 1 Replies View Related

Advanced Query Help

Feb 15, 2006

The below Stored Procedure was refined to incorporate a UDF. My problem now is that I need it to be even more dynamic. I ideally need the user to have the option to select which fields are incorporated into the query. I have the front end framework although not sure currently how to make field selection dynamic...

CREATE PROCEDURE dbo.sp_ClientQuery

(
@inputRegion varchar(500),
@inputPub varchar(500),
@inputCountry varchar(500)
)

AS


SELECT dbo.tblClient.Country, dbo.tblClient.cName, dbo.tblClient.clientID, dbo.tblClient.Wholename, dbo.tblClient.TelNumberG, dbo.tblClient.TelNumberD, dbo.tblClient.City, dbo.tblPublication.pName
FROM dbo.tblOrders INNER JOIN
dbo.tblClient ON dbo.tblOrders.clientID = dbo.tblClient.clientID INNER JOIN
dbo.tblPublication ON dbo.tblOrders.id = dbo.tblPublication.id
WHERE (dbo.tblClient.Region IN (select value from fnSplit(@inputRegion,',') )) AND
(dbo.tblPublication.pName IN (select value from fnSplit(@inputPub,',') )) AND
(dbo.tblClient.Country IN (select value from fnSplit(@inputCountry,',') ))
GO


This is becoming pretty complicated so any help appreciated.

Phil

View 1 Replies View Related

Advanced Sql Query

Jul 26, 2006

Hi Guys

I am having a bit of a delimma and am wondering if there is someone out there that could suggest how i could write a SQL statement that would alow me to return data in a certain way,

I have data as follows...

FIrst problemi is the Date in the LogDate COlumn is of Text Type not Date..

Second problem is i need to take this data and transform it to look like the table below

RCDIDEmployeeIDLogDateLogTimeTerminalIDInOut
411 07/23/200620:45:02iGuard# IN
421 07/23/200620:46:17iGuard# OUT
431 07/23/200620:48:08iGuard# IN
441 07/23/200620:48:18iGuard# OUT
451 07/23/200620:48:24iGuard# IN
461 07/23/200620:48:30iGuard# OUT
471 07/23/200620:48:36iGuard# IN
481 07/23/200620:48:41iGuard# OUT
501 07/23/200620:49:57iGuard# IN
511 07/23/200620:50:14iGuard# OUT
521 07/23/200620:59:34iGuard# IN
531 07/23/200620:59:40iGuard# OUT

Employee IDDateInOutIn OutTotalTimeIn
123/07/200620:3520:3620:3820:3900:02


Basicaly i need to transpose it..

If anyone has the sql or knows the sql on how to do this i would be very greatful

View 3 Replies View Related

Advanced QBF And Importing Into Access

Dec 20, 2005

Hi everybody! :)

After a week of hair pulling problems with no solution, I've decided to ask my question here, knowing someone will be able to help me...

To the point:
I'm to use a QBF with more then one criteria,
(I'm using: like "*" & forms![f_name]![TB_first_name] & "*" or is null),
I'm having a problem with this because when I leave a text box blank, it retrieves everything (because is null = true), what I'm trying to say is: I have a QBF when using, lets say, 3 text boxes, unless I fill all of the text boxes with text, the query retrieves all of the records, can it be fixed ?
I've tried to use IIF but with no success... can anyone help ? :confused:

and another problem: while trying to import data which is not in English, from a Visual FoxPro data base to access, it turns out unreadable, what can I do to transform ASCII to ANSI or Unicode? :confused:

p.s. - Sorry for my English

TIA

WildCat

View 1 Replies View Related

Advanced Employee Schedule

Jul 4, 2006

Hello Everyone
I need to make an employee schedule in access. I am not sure if it is possible, but here are my constraints:

20 employees

5-6 different truck locations (sm1, sm2, sm3, sm4, sm5, sm6) These locations are scattered within our service area.

2 employees must meet at the same truck, (each truck has 2 employees working on it)

some employees can only meet at certain locations (ex. paul can meet at either sm2 or sm3)

all employees are PT so they can only work on certain days or a certain amount of days per week. (ex. paul can work up to 4 days a week and jim can work only sat and fri)

I would like to make a program in access that will take all these factors into consideration. EX. if i try to schedule paul on sm4 the program will not let me do it or it will give a warning or if i try to schedule paul for 5 days it will give me a warning.
It would also be great to have a counter that will show how many days each employee has left to be scheduled for, EX: if i scheduled paul for 2 days it will show that he can actually work 2 days more if i need him to.

I know this might be a lot, but i also know there are so many talented people here so i am sure it is feasible. Please let me know if you know how to do this or if you could guide me through it.

or if you know about a different program that can solve this please let me know
Thanks in advance

View 2 Replies View Related

Advanced Querie Problem

Apr 5, 2006

Hello gurus
I have a d/base (Access 2000) and within this I need to filter out some records


insurnace related
so I have a location code of ten venues coded 2-11 in a table
and I need to extract out informaiton on all of these in one table

I date a date of event and a sum insured , what I need is date difference between date to be enter on a form (default Now()) and the date of the event - this is the easy bit

Now i need to split these out in batches of 30 days into columns
ie 1-30 days
31-60 days
61-90
etc until >240 days

the sums insured need to be in the right date column

example event 1 sum insured @ 25,000 is 45 days away from now so it should appear in the 31-60 column and if there more than 2 events at that venue one being 45 days and the other being 55 and with sums insured @ 25,000 and 35,000 I need them to either be on a line each or combined to give a total of 60,000 in the 31-60 date column


There could be up to 20,000 - to 100,000 of which the code will extract the venue codes of 2-11 and these could be high hundreds records to check and this will be a regularly run question

any thoughts on this would be welcome - each appraoch I take seems to weird and getting nowhere -

i thought about putting a date difference field on my table but it doesn't seem liek the right thing to do as I would have to update this consantly or rather remember to run this query before I run my report - and this just seems wrong

any thoughts

View 2 Replies View Related

Advanced Search More Than 1 Table

Apr 15, 2008

Hi,

I'm a newbie (I know nothing in VBA & SQL but I'm learning) and I've a database of 10 tables. I want to make a query & form to search through these tables and display results(in a form & report) according to the search criteria.

example of my request is attached..

I can PM you my real database if you need it.

Help is appreciated

View 1 Replies View Related

Advanced Searching Through Forms

Mar 1, 2006

ok, i have just had a lengthly conversation with my user and i need an advanced search system.

what i would need is a search function, that does not only list the full field details from each record in the combos..

here is what i mean.. i have a quotation form with different locations and prices in a list box. i have a text box at the top of the form with an onchange event that alters the results in the list box.

so if the user types 'a'.. only the axxxxx records are displayed.. if they type 'ab' only the 'abxxxx records are shown.. and so on.

because my customer may not remember the exact address of their pickup or destination, i cant use this system, because i wont know the first letter of the details previously entered..

eg.. a user may have been picked up from '5 house street, new hampshire crescent.

if all the customer remembers is 'hampshire crescent.. then the above system will not reveal my record..

therefore i would need a search box at the top that allows me to search for any word (or identical consecutive characters) within a chosen field.

can this advanced string search be done in access?

View 3 Replies View Related

Advanced Import Question

Jan 17, 2007

My company just sent all of our contacts to a data company for them to update and "scrub" them with what they have. We sent out 5000 contacts (company, contacts, address, etc) and they sent back a list 0f 2000 that they matched in their database and gave us the "updated" version.

My question is...what is the best way to upload them back into the database replacing the original versions without losing the other data the Scrubbing company didn't have?

thanks a lot

View 2 Replies View Related

Advanced Form/Report

Apr 28, 2007

Please help me if you can. We are in a state of panic right now in trying to figure this out and any help would be appreciated.

Basically I have tried many different angles and have not come up with a solution that works. I have spent 80+ hours trying to figure this out with no luck.

Here is what we need to do: We have a database that has data that needs to be printed on a 3"x6" sized tag. Now there are probably 5 or so different tags that need to be printed. What we need to happen is be able to provide a way to print out all the tags at the same time. The problem is I cannot seem to create one report that will generate all the tags correctly (I could create the code to do this in a form, but I can't get it to work in a report), and I don't know how I would combine multiple reports so that all the tags can be printed at once.

Do you have any ideas on how I can do something like this?

View 2 Replies View Related

Advanced Access 2003 Db Question

Jan 26, 2006

I have two similar spreadsheets. One has about 6500 contacts with email addresses. The other has about 4000 contacts with street addresses. How do I join them into one more versatile database. I have Access 2003, been reading Access 2003 for dummies, I gotta get this figured out soon. :confused:

Thanks in advance.

--Jake

:cool:

View 1 Replies View Related

Advanced Mail Merge Question

Feb 8, 2007

Hi Guys

I know this isn't strictly access but I'm running out of ideas.

I have a merge from my DB to Word and then Word to Outlook. It works quite well but there are a few things I would like to implement to save time for my users.

1) After the data has been merged with word is there a way to automatically fill in the subject field and send it as an email to outlook i.e macro/scrpit in word, access commands

2) Can I have an automatic way of chaning who the mail is sent from. I use my DB to send emails to artists to tell them they are going to be played on our playlists. Each show has a different email (the presenters email). The current method I use is to have my user change his default mail address in outlook to the presenters then do the merge.

But he then has to wait for all the mails to send, then change the default again and repeat. This can turn a 2 min job into 30 mins because of the waiting. It also adds a human error potential of selecting the wrong mail address.


Any ideas what I can do to remedy these? Perhaps a decent third-party add-in?

Thanks

Adam Greer

View 7 Replies View Related

Find Directory - Slight More Advanced Help

Sep 11, 2006

I have successfully found - find directory and its pretty good (awesome comes to mind) and many thanks to ghudson - now this does more that I wanted which is great and I can move my project along further that I had envisaged - now where I get stuck is i want the form to to open up at each folder I have set up
I have make directory button (forgotten where I got this from but many thanks again)
DirName = "C:Datafiling" & Left(Me!QteNo, 6) & " " & Left(Me!QteInsnme, 40)
I am now trying to get the open form to look at this location

i tried tweaking the code to the above - but It didn't work am I being a muppet
i attached a copy of ghudson zip file with this in (I've renamed so I have kept the orginal safe) the form I am trying to open and look at is the one that ends **table

If you have not had the chance to view these (highly recomemnd it)

View 2 Replies View Related

Advanced Ranking Query Options…

May 23, 2005

I have been developing a website where users enter details about positions that they would like to fill.
Other users enter details of positions that are available.
I currently run a ranking query for users that matches from the options they enter which positions best match their profile in a ranked order.

I'm using an Access Database and ASP.
The query is taking a very long time to run.

This is how I have the query built at the moment.


Code:strSQL = "SELECT qryApplicant.* FROM qryApplicant WHERE (((qryApplicant. ApplicantRID) & ''='" & applicantRef & "'));" call getFromDatabase(strSQL, objTempRS, currentPage) if not objTempRS.EOF then applicantWants = True applicantGender = objTempRS.Fields("ApplicantGender") applicantAge = objTempRS.Fields("ApplicantAge") applicantBSMinDuration= objTempRS.Fields("ApplicantBSMinDuration") applicantBSMaxDuration= objTempRS.Fields("ApplicantBSMaxDuration") applicantBSEarlyDate= objTempRS.Fields("ApplicantBSEarlyDate") applicantBSLateDate= objTempRS.Fields("ApplicantBSLateDate") applicantLanguage= objTempRS.Fields("ApplicantLanguage") applicantPosition= objTempRS.Fields("ApplicantPosition") applicantPositionType= objTempRS.Fields("ApplicantPositionType") applicantNationality= objTempRS.Fields("ApplicantNationality") end if if applicantWants then applicantPoss = 0 lineTemp = "" strSQL = "" strSQL = strSQL & "SELECT " & applicantRef & " AS ApplicantRef" strSQL = strSQL & ", qryEmployer.EmployerRID" ' ****************************** Check Gender ****************************** if applicantGender & "" <> "" then lineTemp = lineTemp & "(IIf(([EmployerCSGender]='any'),50,(IIf(([EmployerCSGender]='" & applicantGender & "'),50,1))))" else lineTemp = lineTemp & "(0)" end if applicantPoss = applicantPoss + 50 ' ****************************** Check CheckAge ****************************** if lineTemp & "" <> "" then lineTemp = lineTemp & "+" if isNumeric(applicantAge) then lineTemp = lineTemp & "IIf(([EmployerCSMinAge]<=" & applicantAge & "),IIf(([EmployerCSMaxAge]>=" & applicantAge & "),20,0),0)" else lineTemp = lineTemp & "(0)" end if applicantPoss = applicantPoss + 20 ' ****************************** Check CheckMinMaxDuration ****************************** if lineTemp & "" <> "" then lineTemp = lineTemp & "+" if isNumeric(applicantBSMinDuration) then if isNumeric(applicantBSMaxDuration) then lineTemp = lineTemp & "IIf(([EmployerCSMinDuration]<=" & applicantBSMaxDuration & "),IIf(([EmployerCSMaxDuration]>=" & applicantBSMinDuration & "),20,0),0)" else lineTemp = lineTemp & "IIf(([EmployerCSMaxDuration]>=" & applicantBSMinDuration & "),20,0" end if else if isNumeric(applicantBSMaxDuration) then lineTemp = lineTemp & "IIf(([EmployerCSMinDuration]<=" & applicantBSMaxDuration & "),20,0" else lineTemp = lineTemp & "(20)" end if end if applicantPoss = applicantPoss + 20 ' ****************************** Check CheckEarlyLateDuration ****************************** if lineTemp & "" <> "" then lineTemp = lineTemp & "+" if (applicantBSEarlyDate & "" <> "") then if (applicantBSLateDate & "" <> "") then lineTemp = lineTemp & "(IIf([EmployerCSLateDate]&''<>'',(IIf(([EmployerCSLateDate])>=" & DATE_DELIMITER & AusDate(applicantBSEarlyDate) & DATE_DELIMITER & ",(IIf([EmployerCSEarlyDate]&''<>'',(IIf(([EmployerCSEarlyDate])<=" & DATE_DELIMITER & AusDate(applicantBSLateDate) & DATE_DELIMITER & ",20,0)),0)),0)),0))" else lineTemp = lineTemp & "(IIf([EmployerCSEarlyDate]&''<>'',(IIf(([EmployerCSEarlyDate])<=" & DATE_DELIMITER & AusDate(applicantBSLateDate) & DATE_DELIMITER & ",20,0)),0))" end if else if (applicantBSLateDate & "" <> "") then lineTemp = lineTemp & "(IIf([EmployerCSLateDate]&''<>'',(IIf(([EmployerCSLateDate])>=" & DATE_DELIMITER & AusDate(applicantBSEarlyDate) & DATE_DELIMITER & ",20,0)),0))" else lineTemp = lineTemp & "(20)" end if end if applicantPoss = applicantPoss + 20 ' ****************************** Check Language ****************************** if lineTemp & "" <> "" then lineTemp = lineTemp & "+" if applicantLanguage & "" <> "" then getMultiValues applicantLanguage, ":", arrSplit01, arrSplit01Max itemTemp = "0" for intCounter01=0 to arrSplit01Max if arrSplit01(intCounter01) <> "" then itemTemp = "(IIf(([EmployerLanguage] Like '%" & Left(arrSplit01(intCounter01),3) & "_%'),20," & itemTemp & "))" end if next lineTemp = lineTemp & itemTemp 'Response.Write itemTemp & "<br />" & " " else lineTemp = lineTemp & "(0)" end if applicantPoss = applicantPoss + 20 ' ****************************** Check Nationality ****************************** if lineTemp & "" <> "" then lineTemp = lineTemp & "+" if applicantNationality & "" <> "" then getMultiValues applicantNationality, ":", arrSplit01, arrSplit01Max itemTemp = "0" for intCounter01=0 to arrSplit01Max if arrSplit01(intCounter01) <> "" then itemTemp = "(IIf(([EmployerNationality] Like '%" & arrSplit01(intCounter01) & ":%'),20," & itemTemp & "))" end if next lineTemp = lineTemp & itemTemp 'Response.Write itemTemp & "<br />" & " " else lineTemp = lineTemp & "(0)" end if applicantPoss = applicantPoss + 20 ' ****************************** Check Position ****************************** if lineTemp & "" <> "" then lineTemp = lineTemp & "+" if applicantPosition & "" <> "" then itemTemp = "" getMultiValues applicantPosition, ":", arrSplit01, arrSplit01Max itemTemp = "0" if instr(applicantPosition,"ANY") then itemTemp = "(10)" for intCounter01=0 to arrSplit01Max if arrSplit01(intCounter01) <> "" then if arrSplit01(intCounter01) <> "ANY" then itemTemp = "(IIf(([EmployerPosition] Like '%" & Left(arrSplit01(intCounter01),3) & "_%'),20," & itemTemp & "))" end if end if next lineTemp = lineTemp & itemTemp 'Response.Write itemTemp & "<br />" & " " else lineTemp = lineTemp & "(0)" end if applicantPoss = applicantPoss + 20 ' ****************************** Check PositionType ****************************** if lineTemp & "" <> "" then lineTemp = lineTemp & "+" if applicantPositionType & "" <> "" then getMultiValues applicantPositionType, ":", arrSplit01, arrSplit01Max itemTemp = "0" strType1 = "" for intCounter01=0 to arrSplit01Max if arrSplit01(intCounter01) = "ANY" then strType1 = "(10)" next if strType1 <> "" then itemTemp = strType1 for intCounter01=0 to arrSplit01Max if arrSplit01(intCounter01) = "rea" then strType1 = "(IIf(([EmployerPositionType] Like '%r??:%'),15," & itemTemp & "))" end if next if strType1 <> "" then itemTemp = strType1 for intCounter01=0 to arrSplit01Max if arrSplit01(intCounter01) = "coa" then strType1 = "(IIf(([EmployerPositionType] Like '%c??:%'),15," & itemTemp & "))" end if next if strType1 <> "" then itemTemp = strType1 for intCounter01=0 to arrSplit01Max if arrSplit01(intCounter01) <> "" then itemTemp = "(IIf(([EmployerPositionType] Like '%" & arrSplit01(intCounter01) & ":%'),20," & itemTemp & "))" end if next lineTemp = lineTemp & itemTemp 'Response.Write itemTemp & "<br />" & " " else lineTemp = lineTemp & "(0)" end if applicantPoss = applicantPoss + 20 strSQL = strSQL & ", (" & lineTemp & ") AS Total, qryEmployer.EmployerActive, '" & applicantPoss & "' AS Poss, qryEmployer.* FROM qryEmployer " strSQL = strSQL & "WHERE (((qryEmployer.EmployerActive)=True) AND ((qryEmployer.EmployerLastLoginDate)>" & DATE_DELIMITER & dateAdd("d",(optionDaysListed * -1),now()) & DATE_DELIMITER & ")) " strSQL = strSQL & "ORDER BY (" & lineTemp & ") DESC, qryEmployer.EmployerLastLoginDate DESC;"


Does anyone know any other ways to build this type of Query to show result in a ranked order.

View 1 Replies View Related

Queries :: Query With Advanced Variable?

May 10, 2013

I wan't to create special query who show only special package. It must work that.

1. Client logg in. System rember his chose. varPrawa="Client" and varIDLogin=5

2. Client click at button "Show Your Package". At that moment query haven't got any criteria so it show every package but it must show only package with IDClient=varIDLogin so only package with IDClient=5 it is easy to create. I tell more it is still easy to join other person but only with varPrawa="Client" i want to create one query who must select by.

WHEN varPrawa="Client" then show only package with IDClient=varIDLogin

WHEN varPrawa="Kurier" then show only package with IDKurier=varIDLogin

WHEN varPrawa="Spedytor" then show only package with IDSpedytor=varIDLogin

WHEN varPrawa="Administrator" then show all package without varIDLogin criteria.

I create subraport who use chosen package in my list and display all special data using varaible but my problem is how to create query whose can select and display only package of that Client or Kurier or Spedytor.

At the end

When Client is online he can see only his packages special IDClient (any IDKurier, IDSpedytor)
When Kurier is online he can see only his packages special IDKurier (any IDClient, IDSpedytor)
When Spedytor is online he can see only his packages special IDSpedytor (any IDClient, IDKurier)
When Administrator is on line he can see all packages (any IDClient, IDKurier, IDSpedytor)

How i can create this query?

View 5 Replies View Related







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