UK Postcodes In The Query Design Grid.

Oct 13, 2006

Hi everyone;

I am using Access 2003 with Windows XP Pro. I have a problem with using a query and the dreaded UK Postcodes!

I have a Client table that contains a field “Client Postcode 1”, in which is entered the first part of the UK postcode i.e. AB11, WC1A, E1, EC2V, etc.

In a Candidate table here are many text fields where we enter which postcode a Candidate wants to work in, i.e. TN, CV4, EC, W, etc.

We have a separate Candidate Search form where we select a particular client (Combo box from the Client table) which then displays the Client’s Postcode 1 data i.e. the first part of the UK postcode before the space.

We have a select query that then tries to match the Client Postcode 1 with the postcode that the Candidate wants to work in from the Candidate’s table.

In this query design grid I have successfully created criteria that will match the Client Postcode 1 field to the Candidate’s postcode field – very straightforward. This, for example, will match a Client with a TN39 postcode with a Candidate who wants to work in the TN39 postcode.

In the same query design grid I have also been able to successfully match the Client Postcode 1 field to a Candidate’s Postcode field using just the first 2 letters (using Left). This matches a Candidate who wants to work anywhere in the TN postcode area (TN1, TN2 etc.) with a Client whose postcode starts with TN

However, what is stumping me is where a Client’s Post code has only 1 letter followed by numbers (E1, B2 etc) in the first part of their postcode without returning EX, BL etc. I would like the accumulated wisdom on this forum to point me in the right direction to design criteria to input into the query design grid that will match ONLY the first letter of the postcode IF the second character is a number.

Regards to all - and what an excellent site!

View Replies


ADVERTISEMENT

Using DCount() In Query Grid

Oct 14, 2007

I am a beginner with aggregate functions.
I have two tables, one describing parts, and one describing assemblies that use those parts:

tblParts show all the part descriptions, including fldPartNumber.

tlbWhereUsed shows zero or more fldAssemblyNumber records for each fldPartNumber.

I want a query that shows, for each record of tblParts, the number of assemblies that use that part. I specifically want to do this with an aggregate function:

DCount("*","tlbWhereUsed ","[tlbWhereUsed].[fldPartNumber]=[tblParts].[fldPartNumber]")

but I don't know where to put this function call in the query grid.
(I do not want to do this in VBA, if I don't need to).
Thanks in advance...

View 3 Replies View Related

Adding Two Fields On A Query Grid

Oct 16, 2005

trying to add 2 fields

=[field1] + [field2]

works but I want a space between the 2

how do you do that?

jon

View 1 Replies View Related

Date Value Query Grid Problem

Nov 15, 2006

I have the following field which is stored as a string: [field3]"2006090111123500"

the first 8 characters represent the date but backwards.

I want to filter between dates.

I have the following in the query grid:

CallDate: DateValue(Right(Left([Field3],8),2) & "/" & Mid(Left([Field3],8),5,2) & "/" & Left([Field3],4))

with criteria: >=#01/10/2006# And <=#31/10/2006#
This seems to work on october data no problem

I had hoped to put all the september data into the same data table and filter but it failed so I created a new table called september data and pointed the query to it but for september:
with criteria: >=#01/09/2006# And <=#30/09/2006#

however the query fails if I take out the calldate expression it works no problem.

In fact it works providing I dont try and filter on date or sort by ascending.

it says data type mismatch in criteria expression. I had hoped that datevalue would turn the string into a date.

Its strange that it works in one query and not in the other with only the data being different.


Can anyone see why this should fail have I done something stupid?

kind regards in advance.

peter

View 9 Replies View Related

Queries :: Using OR Criteria On A Query Grid

Feb 14, 2014

I have a query that runs to check if a form has any empty delay hrs.

Code:
SELECT [Tble-wcDelays].ID1, [Tble-wcDelays].LinkingID, [Tble-wcDelays].HoursDelay, [Tble-wcDelays].ReasonDelay
FROM [Tble-wcDelays]
GROUP BY [Tble-wcDelays].ID1, [Tble-wcDelays].LinkingID, [Tble-wcDelays].HoursDelay, [Tble-wcDelays].ReasonDelay
HAVING ((([Tble-wcDelays].LinkingID)=[Forms]![Frm-RPC]![wetcleanID]) AND (([Tble-wcDelays].HoursDelay) Is Null)) OR ((([Tble-wcDelays].LinkingID)=[Forms]![Frm-RPG]![wetcleanID]) AND (([Tble-wcDelays].HoursDelay) Is Null));

I'm trying to avoid cerating multiple queries that dothe same thing. But if this qurey runs from the form "FRM-RPG" then It errors because it can't find "FRM-RPC" so why does it not over look that frm and go to the 2nd Frm ?

View 3 Replies View Related

Formating Date Field In Query Grid

Nov 13, 2007

Hey.

How do I format Date field in query grid to make field into "11/11/2007" if the data originally has time, or in form "11 Nov, 2007" ?

View 2 Replies View Related

Help With Categorising Postcodes! :(

Mar 7, 2006

I have a database with 3000 + records all with customers from all over the UK.


The CUSTOMER table contains
>customer ID
>name
>address
>postcode

I have been asked to produce reports from the database.
These reports should group all customers into postcodes regions and then display information accordingly. E.g how many customers have ordered information in region 1.


For each region I have been give a list of postcodes.

Region 1, e.g LS17, LS18
Region 2 e.g BD4 0,
Region 3 ETC
Region 4 ETC

Each region list is extremely long to type in but I have a copy on paper.

Could someone help and guide me into a quick way of grouping the required postcodes into regions 2 enable the reports to be produced.

One way I have done this is by doing a select query and typing in the criteria “like “LS1*” or like LS18*” …and by typing this on and on to the list this is quite long.

Plus I need to be able to use the * function so I select the correct postcodes.

As this is so time consuming ..Bearing this in mind I have been told a far better approach is to put the postcodes in a table and then perform a lookup on that table when trying to determine the region.

I don’t understand what to do…would this be a better approach if so how would I do this as I don’t know how to use lookup? Could someone help me? Perhaps with a small example so I could follow it? :(

Appreciate any help

Many thanks

View 12 Replies View Related

Categorising Postcodes? Can Someone Help?

Mar 13, 2006

I have a database with 3000 + records all with customers from all over the UK.


The CUSTOMER table contains
>customer ID
>name
>address
>postcode

I have been asked to produce reports from the database.
These reports should group all customers into postcodes regions and then display information accordingly. E.g how many customers have ordered information in region 1.


For each region I have been give a list of postcodes.

Region 1, e.g LS17, LS18
Region 2 e.g BD4 0,
Region 3 ETC
Region 4 ETC

Each region list is extremely long to type in but I have a copy on paper.

Could someone help and guide me into a quick way of grouping the required postcodes into regions 2 enable the reports to be produced.

One way I have done this is by doing a select query and typing in the criteria “like “LS1*” or like LS18*” …and by typing this on and on to the list this is quite long.

Plus I need to be able to use the * function so I select the correct postcodes.

As this is so time consuming ..Bearing this in mind I have been told a far better approach is to put the postcodes in a table and then perform a lookup on that table when trying to determine the region.

I don’t understand what to do…would this be a better approach if so how would I do this as I don’t know how to use lookup? Could someone help me? Perhaps with a small example so I could follow it?

Appreciate any help

Many thanks

View 9 Replies View Related

Selecting Multiple Postcodes From Table

Aug 15, 2006

This must be the easiest of things, but I haven't used access in a while in now in my new job I need to run the following query.

I have to select a number of postcodes from a single table to see how many are in there. For example select postcodes beginning with B, CV, DY, HR, ST, TF, WR, WS, WW. Then I need to write down how many records found with the above postcodes.

Also I may have to omit some too like omit CV12

Thank you in advance

View 1 Replies View Related

Queries :: Postcodes - Return Only TEXT Before Numbers

Jun 17, 2015

I have a number of short postcodes ie

S43
GU10
ME8

etc etc

I want a run query to return only first characters before the numbers ie..

S
GU
ME

View 4 Replies View Related

Queries :: Match Postcodes Ad Return Part That Matches?

Sep 7, 2014

I have been given a list of UK postcodes, with the following format L15TG or TS14TGU.

I need to be able to match these postcodes to a list of postcodes I have stored in the database, however, my list are only UK outcodes, so L15TG is just L1 and TS14TGU is just TS14.

So I need to match the records and return the part of the string that matches i.e take L1 from L15TG.

View 5 Replies View Related

Query Design.DB Design Question

Sep 10, 2007

Hey,

I've got this problem and im 95% sure its going to need a query in order to achieve this answer im looking for.

I'm creating a Software Licensing Management db and its all working lovely. However my only problem remains is the graphical representation (text box within one of the forms) of howmany licenses are/aren't(doesnt matter if this number is a +/- number) available.

In order to achieve this answer I dont think you'l need the table structure of any of my tables other than these two:

tblLicenseInformation
License_ID
LicenseDescription
NumOfLicensesPurch
SoftwareOverview_ID

tblHardwareSoftwareLicense
HSL_ID
Hardware_ID
Vender_ID
Software_ID
AppEdition_ID
AppVersion_ID
SoftwareOverview_ID
License_ID

However I would like to add a column to either of these tables named 'Availability' or something similar which will show the licenses available.

I've tried a number of Update/Append queries but all have failed. I want this Available running variable held within the table due to it not changing to much of the current db design as i baisically finished the project and they asked for it! any ideas of how to efficiently achieve this will be much appreciated!

cheers

View 3 Replies View Related

Design View Keyboard Shortcut - Expand Columns In Design View Of A Query

Jun 5, 2014

I'm looking for a keyboard shortcut to expand the columns in "design view" of a query.

What I mean by this is rather than selecting all of the columns and double clicking to see the entire text, I'd like to be able to a shortcut.

The entire process as I see it involves 3 steps so I will need thesolution to the 3rd step.

(1) [ctrl+spacebar] to select initial column
(2) [shift+arrows] to select all of the columns I need
(3) [keyboard shortcut] will expand all of the columns "field" names to the size of the column heading

Alternatively, if you know of a shortcut that will expand the columns without having to select them first I'll take it!!

View 4 Replies View Related

Grid

Nov 14, 2007

I would like to seek guidance again on my new project, I wanted to create a data entry form that the user can input records using my unbound label boxes, then upon hitting an add button it will go automatically on a subform below or a GRID so that the user can see all the records at a glance.

View 2 Replies View Related

Where Did My Snap To Grid GO?

Oct 17, 2006

I have Grid X and Grid Y set at 24. Usually I see dots all over my forms.... which allows me to snap controls to the grid. Today I only see large boxes instead?

Did I change some setting?

Thanks

View 3 Replies View Related

Flex Grid Control In MS Access

May 31, 2005

Hi all,



Can I add a flex grid control on a MS ACCESS form.



IF yes, does MS access 2003 has a flex grid control, i cant find one in the toolbox.

MAy I know where can i find the control?

Thanks

View 2 Replies View Related

How To Create A Report With Grid Lines?

Aug 22, 2006

Hi,

In my first steps working with Access I feel unable to find out how can I create a report that shows the data (records from a Clients Table - Name, Phone, e-mail fields-) in a "spreadsheet like" format with gridlines. Can anyone help me on this?

Thanks

View 2 Replies View Related

General :: Grid Has Disappeared From Subform

Oct 16, 2012

I have a orders sub form that was working great .Then all of asudden when i when to input information into the fields i realised the grid under variuos field names has disappered (Icant enter any info),surly this must be something i have accidentally done without realizing.

View 13 Replies View Related

General :: Track Locations On A Grid?

Feb 16, 2013

I am writing a database to track our (and others) wine collections. i'm wanting to track what bottle is where. so i can look up what i have, look up where i have put it and away i go to get it, simple right?

just to complicate things i want a system in place. where the end user and use forms to add/remove or modify wine racks.

assuming that all racks are rectangular i would like to be able to add a rack and call it rack 1. rack 1 has 4 shelves all able to hold 5 bottles. the database would then say that bottle X is in rack 1 shelf 1 position 1.

if possible there will aslo be a screen that is auto generated by the database showing a simple grid with grrn and red squares denoting if the position if full or empty. the ability to click on a position to see what is in there or to add a bottle there would be amasing but not fussed if that can't be done.

View 2 Replies View Related

What Is Best Control To Display Data In Grid Format?

Jun 30, 2006

I have a search page and would like to display the search results in a grid/table format. User will be able to select a row to go to a detail screen. What is the best component type to use for this?

View 1 Replies View Related

Reports :: Grid Line Of Fields In Subreport

Aug 22, 2013

I am using Access 2003. Is there any way to put grid lines among fieldnames and contents just like in Excel in the output of subreport?

View 1 Replies View Related

General :: How To Get The Form To Open First Then Populate Grid

Sep 4, 2012

I am struggling with a slight form delay. When it opens on the OnOpen event, i am populating a grid. This takes about 3 to 5 seconds but, the it also takes the form the same time to open. What i need to do is get the form to open then populate the grid. Can i make the form open first then populate?

View 4 Replies View Related

Reports :: Display Grid View Images On Report

Apr 2, 2015

How can I display multi images on 1 page as a grid view in access report...

View 5 Replies View Related

Reports :: Grid Line On Bottom / Last Record Of Report

Oct 25, 2013

I created a report that only has gridlines around the outside border of the entire report (rather than around each record). I want the grid line style on the last/bottom record to be solid so it boxes in all the records. When I change the "Gridline Style Bottom" for the records, each record has a bottom gridline rather than an outside box around all the records.

View 1 Replies View Related

General :: Drawing A Line Over The Grid Depending On What Day It Is And Time

Sep 14, 2012

Here is a project. I have a grid on a form. its width is 20cm wide and 15cm tall. in the grid are 6 groups of columns (all columns listed are from left to right).

Group 1 - 5cm wide - description
Group 2 to 6 are 30cm wide and represent days. Each group is split into 8 columns which represent hours per working day.

I need to to draw or position a line over the grid depending on what day it is and time. for example, lets say its thursday at 14.30. ( the 8 hour columns run from 8am to 4pm ) it would need to look like this-

So I need to work out the position of of the line depending on the time of of the day in the week. The day can be determined by the column header, the time by the grid....

View 6 Replies View Related

Forms :: Grid-rows Not Displaying Selected-state Correctly After Many VBA Requeries

Mar 2, 2014

when i select rows in a ListBox control on a form, using access VBA, some rows behave exactly the opposite of how they're supposed to behave-- they APPEAR unselected when i select them, and selected when i unselect them.

Code:
oListBox.Selected(lngRow) = True

However, when i check their Selected property with VBA they return the expected value (meaning the row Selected value is TRUE if i set it to TRUE, if tho it LOOKS UNselected).

Code:
Print oListBox.Selected(lngRow)
->True

Access ListBox Control Under VBA Control Behaving Wacko - YouTube.It seems that the more times i requery the listbox, the worse the problem gets.

Code:
oListBox.Requery

This problem seems unrelated to the number of times i select rows. Only seems related to multiple requeries. At first, it does not happen. Then with repeated requeries, the problem gets progressively worse. Note, 'Row Source Type' is set to 'Table/Query'. 'Multiselect' is set to 'Simple'.

i'm not using the "Form_" syntax anyplace (which can created unintended instances of forms). this listbox source-query contains a VBA function in a module, which in turn calls the code-behind of another form.

View 6 Replies View Related







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