Lookup Difficulties

Aug 29, 2007

I'm having trouble creating my query
I have a table representing the company's products. Ever once in a while the products get replaced by a newer product. Like below
_____________________________
Product - Replaces - Replaced By
a..................................b
--------|----------|-----------
b.................a...............e
--------|----------|------------
c
--------|----------|------------
d
------------------------------
e.................b

Can someone help me write a query so the result below will be shown in
three fields.

Product - Replaced by level 1 - Replaced by Level 2-Replaced by level 3
....a..................b.......................... . e......................and so on

View Replies


ADVERTISEMENT

Emailing Difficulties

Feb 22, 2006

I've been working on a database for the last month or so. It's been a slow process since I've been learning Access and VBA in the process.

But my supervisor wanted a copy of it as a progress check to send to his boss. So I sent an email with a copy of the database as an attachment.

THe email went through, but when my supervisor tried to open said email, a dialogue came up saying that Access couldn't open the file because it was "out of the intranet or on an insecure site" or something along those lines

I was just wondering what this meant and how I would be able to send my boss a copy of the database so that it can be reviewed and such. Would this require splitting it?

Thanks in advance,
Nathan

View 2 Replies View Related

Difficulties With System

Feb 8, 2006

Hi, I’ve been having some problems being able to do some things on my database, I was doing ok creating my system but now I’m a bit confused about what to do and I’ve been trying but getting no where. Firstly on my order form I need a total for the products which are in an subform and after the order is complete I need to be able to create an invoice and keep all the order information in the 'invoice' and 'invoice details' tables. I also need it to update the stock levels after the order is complete. Then I had created a tab in 'view customers' and I wanted to have it so that past customer orders could be viewed. Any help is appreciated; here is a link to my system:
'Gamez System' (http://www.savefile.com/files/5877934)

Thanks, Bob.

View 1 Replies View Related

Difficulties On My Form. Help Please!!!!

Dec 14, 2006

Hi! I have a problem with my form [EDITAR], the problem is that i did a form basing me on a table, but now i want to create a command that when i press it, it has to let me edit my data. i don't know how to explain me very well. i want to change my data but changing it with my form and save that information.

the other problem is that i want to create the same form for but only to add new data on the same table, i want to create a command that i will press if i want to add new records.... help i really need help:confused:

View 7 Replies View Related

Update Difficulties!!!!!

Jun 29, 2006

Hey guys,
This has really got in my nerves.....

I have a table with 2 fields (pr_row, pr_col).
All i want to do is:
I want to update the table so that every 21 records, the pr_col field will increase from 1 to 21 and so on, and the pr_row field
will remain with the same value (but increasing by 1 every 21 records)
Explaining
pr_row-pr_col
===========
1 - 1
1 - 2
1 - 3
.
.
.
.
1 - 21
2 - 1
2 - 2
2 - 3
.
.
.
What is the update query that i must execute?

View 1 Replies View Related

Difficulties With Getting The Right Responce From My Queries

Oct 27, 2005

Hello,

I am having difficulties with working out how to create a correct query from my database. :confused:

These are the two results I require:

What strength of whisky sells the best at Christmas (How do I do an 'In-Between' date condition regardless of the year? i.e. >= #01/12/____# AND <= #31/12____#)
Which companies have not purchased at least one bottle from each region?

However, I am not sure how I would go about getting these specific results from the database. I have done serveral previous questions based on the database (which can be seen in the .mdb file) however these two are proving troublesome. I have attached the database to this post if anyone who is at ease with queries would be kind enough to have a quick peeky at it.

Any help would be greatly appreciated !

Note. the database information is fictisious. :rolleyes:

View 1 Replies View Related

Access Importing Difficulties

Oct 26, 2005

Hey,
I have an access database that imports a certain range of a certain sheet from 30 files all of which are in the same folder and I am trying to get that BOTTOM MOST peice of code to automate the process.

Now one of my many complications was that the excel files are workbook protected, and so it would give the 'cannot decrypt error' that’s why I have all that code regarding unprotecting it... but for some reason its not working

It gets to the line where it gives it the password and it tells me the password is unaccepted, and yes the password is correct...

It must have something to do with the do loop, because it works fine whenever I used it over one import file and thus without the loop... Like this for ex works perfectly fine

Code:Public Function TransferSP()ExcelFile = "G:CBTFILENAME"On Error GoTo ErrTrpStartAgain: DoCmd.TransferSpreadsheet acImport, 8, "TEST", "G:CBTFILENAME", True, "Access_Upload!C13:L34"xlapp.ActiveWorkbook.Protect (blah)ErrTrp:If Err.Number = 3161 Then 'Encripterror so unprot wb xlapp.Visible = False 'Open Excel xlapp.EnableEvents = False 'Disable Events xlapp.workbooks.Open ExcelFile 'Open File xlapp.ActiveWorkbook.Unprotect (blah) 'Unprotect xlapp.ActiveWorkbook.Save 'Save xlapp.EnableEvents = True 'Enable Events xlapp.ActiveWorkbook.Close 'Close File xlapp.Quit 'Quit Excel GoTo StartAgain 'Try and Import againElseEnd IfEnd Function

So Please tell me what is wrong with this bottom piece of code...

And secondly, I have a table which contains a list of names, whether they are active (checkbox) and their filenames each on a column of its own...

Can anyone show me how i can include into my code (assuming the password problem is fixed) that would allow me to place an if statement that checks whether the user is active or not... IF he is then it imports his file (using the filename column next to his name).... If he is not active then it just goes onto the next person without importing him/her

Right now I have it importing all the files in that folder

Code:Option Compare DatabasePublic xlapp As New Excel.ApplicationPublic Sub ImportAll() Dim strPath As String Dim strFileName As String strPath = "G:CBT" 'Set Path strFileName = Dir(strPath & "*.xls") 'Set first file Do On Error GoTo ErrTrp DoCmd.TransferSpreadsheet acImport, 8, "Test 2", strPath & strFileName, True, "Access_Upload!C13:L34" ErrTrp: If Err.Number = 3161 Then 'Encription error so unprotect workbook xlapp.Visible = False 'Open Excel xlapp.EnableEvents = False 'Disable Events (Macro's) xlapp.workbooks.Open strPath & strFileName 'Open File xlapp.ActiveWorkbook.Unprotect (blah) 'Unprotect 'Try and Import again DoCmd.TransferSpreadsheet acImport, 8, "Test 2", strPath & strFileName, True, "Access_Upload!C13:L34" xlapp.ActiveWorkbook.Save 'Save xlapp.EnableEvents = True 'Enable Events xlapp.ActiveWorkbook.Close 'Close File xlapp.Quit 'Quit Excel Else End If strFileName = Dir() 'look for next file If strFileName = "" Then 'no more files Exit Do End If LoopEnd Sub

Please let me know what I can do with this
I am a novice at coding...Just tell me where to put the code

Thanks

Ayyad

View 11 Replies View Related

INSERT INTO With Summation And DSUM Difficulties

Aug 29, 2007

hello all,

i stumbled upon this site via google while i was trying to find a solution to my problems! i'm a pretty proficient pl/sql writer and this is my first time trying to learn jet sql so a lot of the things i'm used to in pl/sql can't be done in jet sql!

1) i'm trying to create a summary record from RR_FT_COMPONENT to RR_FT_TOT_PAYOUT. this is basically summing some payout fields by grouping by payee_id and period_id. from my research i've seen that jet sql doesn't like sum or group by's for updates. is it the same for doing select statements for insert into?

when i run the query i get the following error: "ms access can't append all the records in the append query. MS access set 0 fields to null due to a type conversion failure"

all of the fields on both tables have the same type. is this a group by and sum problem? i ran the select statement separately and it worked fine.

code:
INSERT INTO RR_FT_TOT_PAYOUT ( market, region, financial_center, payee_id, employee_name, manager_flg, lic_code, job_code, period_id, volume, cp_spread, ytd_spread, cp_comm, ytd_comm, prior_yr_flag )

SELECT max(rc.market), max(rc.region), max(rc.financial_center), rc.payee_id, max(rc.employee_name), max(rc.manager_flg), max(rc.lic_code), max(rc.job_code), rc.period_id, sum(rc.volume), sum(rc.cp_spread), sum(rc.ytd_spread), sum(cp_comm), sum(ytd_comm), max(prior_yr_flag)
FROM RR_FT_COMPONENT AS RC
GROUP BY rc.payee_id, rc.period_id;


2) in this next code i'm trying to sum spread information in the ft_txn_summary table for a given payee_id, market and period_id. i'm using dsum and have the appropriate joins to keys on the tables, yet this update sums ALL records in the ft_txn_summary table rather than summing the specific payees in the join. any idea on what's wrong or how to debug dsums?

code:
UPDATE rr_ft_component AS rc SET rc.cp_spread = Dsum("txn_spread","ft_txn_summary","ft_txn_summary.payee_id= " & [rc.payee_id] AND "ft_txn_summary.market= " & [rc.market] AND "ft_txn_summary.period_id= " & [rc.period_id])
WHERE rc.component_name='Total Revenue';


any help would be appreciated! thank you!

View 1 Replies View Related

Difficulties In Designing Functional Forms And Tables...

Nov 14, 2004

Hi,

I am a newbie at Access and am basically designing my first database. This database is for a short term project and is designed to track the attendance of employees at acompany. Here is a brief description of the tables and forms in question.

EmployeeInformation - this table stores records of each employee, their ID, DOB and SIN.

AttendanceProfile- this table stores records of prolonged absence periods for each employee. A given employee can have many attendance profiles, meaning that this table is linked to the EmployeeInformation table via a one-many relationship. This table will provide detailed information about the status and history of each Profile. So for example if an employee misses work for 12 days due to an appendicitis operation, the exact nature and dates of this absence would be listed as a new profile. The primary key for this table is an autonumber field called ProfileID

ActionLog - this table stores the actions taken by company employees (if any) in response to each AttendanceProfile. It is connected to the profiles table via a one-one relationship with ProfileID being the foreign key in this table. Another main field is the ProcedureNum field which will list the number of each procedure taken for a given ActionLog record. This table is needed to track what the company has done/is doing to track an employees prolonged absence.

Allow me to illustrate with an example. An employee, John Doe misses 15 days in June 2001 due to an illness in the family. An AttendanceProfile record is then made for this period illustrating the exact nature of Mr. Doe's absence as well as tracking what official documents he has submitted (eg medical note, official company documents). Another matching record containing the same ProfileID is also made in the ActionLog table describing what the company has done so far to track this absence. So if an HR employee calls Mr Doe's physician to verify this illness or sends a letter requiring further documentation, each of these steps is listed in this log for this absence profile.

Sorry for the long-winded explanation, but better now than to have to clarify myself later. Here is where I'm stuck. I would like to set up two data entry forms, to create new AttendanceProfile records and related ActionLog records. Obviously, these corresponding records are linked directly by the ProfileID field. After completing the AttendanceProfile form, I would like the user to be able to click a command button to open another form (I am avoiding a subform in this case because my attendanceProfile form is huge and I cannot conveniantly fit a subform on it) to open a new form where they can enter Procedure descriptions and dates on the ACtion log. For each new procedure the user enters, an autonumber fields automatically increments the procedureNumber for that specific ProfileID.

Finally, my question to any of you is, assuming that I have already designed the AttendanceProfile table and form, how shall I design the ActionLog table AND forms to accomplish this exact task.

Once again, sorry for the excessive detail. Your assistance is greatlys appreciated.

Regards,
Mike J.

View 1 Replies View Related

LookUp Tables For Dynamic Set Of Attributes: Set A Pointer Or Use A Generic LookUp?

Jul 24, 2007

I'm wrestling with the issues; in other threads, it became apparent that because I could not know ahead of time what I will need to know about a given entity, I will use a table to enumerate attributes that is applicable for a given entity.

However, the stumper is that what if an attribute should conform to a set list of values? Since they are dynamic, I would have problem predicting what I will need to be able to lookup, and am even don't know whether I will need a one-many lookup or many-many lookup.

I thought that generic lookup table with a table listing "classes" of lookup would allow me to have one big generic lookup table while using "classes" to act like virtual tables so I can then set the query to appropriate "class" to return just right set of values.

But as I thought about it, I ran into some issues which is pulling me toward the crazy idea that I should have freestanding tables, and use a field in tblAttribute to give me the table's name so I'd know which free-standing table it points to, and have the necessary key to lookup the values within that table.

Even though my gut instincts tell me that I shouldn't be going against the conventions of database design (who the frick goes around creating free-standing lookups?!?), I'm simply not sure how I can use a generic lookup table to hold all information.

For example, suppose I was given a list of values that has its own categories. Since the former design allows only for two level (lookup and lookupclass), where am I to insert that extra level?

Furthermore, I found myself needing a set of virtual keys to reference a certain "class" of lookups for report purposes. That means I need an extra field in my lookup table than I originally anticipates. What if I find myself needing one more field that just won't fit the generic lookup table?

So does anyone have suggestions on how we would create a placeholder for a lookup table that will be made just in time?

View 4 Replies View Related

Filtering Lookup Value Based On Other Lookup Values

Jul 27, 2015

I have three large source tables imported into my database. I have created queries to retrieve relevant values from fields in each source table which feeds into my form. Each field on my form that is connected to the relevant query is a lookup field. For example, one field called "Supplier_Name" another called "Supplier_Code" and a third called "Route_Number".

Needless to say each of my lookup fields are very long. I am trying to filter my search based upon the selection from the previous Lookup field. How I can filter a lookup field's value based upon the previous lookup field selection? Each Supplier has a code and assign route(s) and I have already established these relationships.

View 4 Replies View Related

Lookup Fields Using Lookup Wizard

Mar 2, 2005

Hello,

I wonder if anybody can help me.

I have a table called ITEM, within ITEM I have three fields ITEM NUMBER (Key Field), Item, Cost,

I have another table called INVOICE ITEMS, Within INVOICE ITEMS I have six Fields, INVOICE NUMBER, ITEM NUMBER, ITEM, UNIT COST, Amount, Total Amount.

I want to use Lookup wizard to complete the fields ITEM NUMBER, ITEM, UNIT COST from the ITEM table.

Is this possible?

Regards
Nathan

View 1 Replies View Related

Tables :: Lookup Field Using Another Multi Value Lookup Field As Data Source

Nov 23, 2012

how to do a particular thing in Access 2010 (I don't even know if it is possible).

I have a table named PRODUCTS:
ID_PRODUCT (primary key, autonumber long integer)
ALLOWED_OPTIONS (multi value text lookup field: "Option 1";"Option 2";...;"Option 9")

So I can store, for each different product, none, one, or more options to let the customers choose from.

I have a table named ORDERS:
ID_ORDER (primary key, autonumber long integer)
FK_CUSTOMER (foreign key, linked to the primary key of a CUSTOMERS table; represents the customer that places the order.)
FK_PRODUCT (foreign key, linked to PRODUCTS.ID_PRODUCT; represents the product that the customer has choosen)
CHOOSEN_OPTION (lookup text field; the customer must choose ONE option among those allowed for the product he has ordered)

The problem is that I would like the CHOOSEN_OPTION field to show as a combobox, listing the values stored into PRODUCTS.ALLOWED_OPTIONS, so that when a customer buys a product, he can choose only among the options allowed by that particular product.How can I manage a multi value field to populate a combobox, in which every item stays on its line? If I use, as a query to populate the combobox:

select [PRODUCTS].[ALLOWED_OPTIONS]
from PRODUCTS
where [PRODUCTS].[ID_PRODUCT]=[FK_PRODUCT]

I obtain an empty combobox.If I refer to the last field as [ORDERS].[FK_PRODUCT], Access asks me to type a value for "[ORDERS].[FK_PRODUCT]", treating it as an unknown parameter.I think that the problem is that when the combobox expands, the record is not committed yet, so FK_PRODUCT is unknown (NULL?). But this happens even if I commit the record typing something in FK_PRODUCT and then I re-enter the record and I expand the CHOOSEN_OPTION combobox, that is still empy although FK_PRODUCT exists, now.Is there a particular syntax to refer to a field in a record not committed yet (something like "THIS." or "ME.")?

View 5 Replies View Related

How To Use Lookup

Oct 26, 2005

I have an Invoice & Address file I want to know how I can for example enter customer number in the Invoice file and get the information form Address file in the Invoice file.

Thanks

View 3 Replies View Related

Lookup Help

Feb 19, 2008

Hi all
Im trying to create a database where one field has a lookup to another field in another table (easy enough done) the the next field in the first table has another lookup, however the items the user can select change dependent on what was selected in the first feild eg:
SelectA -A1
-A2
SelectB -B1
-B2
So the user can only select B1 in the second field if SelectB was picked in the first field

Does anyone know whow this is done

Thanks
Chris

View 1 Replies View Related

Lookup Value

Oct 26, 2006

I wonder if anyone can help.
I have 2 tables.
Table1 (lookup table)has 2 fields: 'rate' and a 'minimum amount'. The rate applies to a range of values eg up to 1000,rate=20, up to 5000, rate = 22 etc.
Table 2 has 3 fields: 'UniqueID', 'current_rate', 'amount'.
The 'amount' field in table 2 increases on a monthly basis and when this reaches the next amount threshold (in Table1), the 'current_rate' needs to be updated in table 2 to the appropriate value.
I have searched this forum and Dlookup seems looks to be the only way to do it. However, I think this only returns one result and some of the suggested solutions use a form to input the 'amount', when I have many entries that need to be updated.
Any suggestions would be appreciated.

View 4 Replies View Related

Lookup

Jun 21, 2007

i'm sure this must be pretty simple but when i search for lookup i keep finding stuff about translating names into numeric id's which is not what i mean

what i have is a table TBL_EnergySavings with these fields

IDFuel, IDProperty, IDMeasure, EnergySaving

its a lookup table so that given the three ID numbers (of a type of energy saving measure like loft insulation, installed in a certain type of property which uses a certain type of fuel) we can say how much energy is typically saved in GWhrs

I have another table of installed measures (jobs) which has property type, fuel type and measure type amongst its fields and what i need to do is to fill in a column in that table with the energy saved by each measure

so how do i look up the relavant record from TBL_EnergySavings?

View 9 Replies View Related

Lookup Help

Sep 9, 2005

Hi, im fairly new to access. im creating my 2nd access project for my 2nd year of A levels and i need a bit of help with lookups on a form im using

heres a screenshot of the form

http://beta9.picturehost.co.uk/cat.jpg

What i want is for when you select an option from the category combo box, for the sub category to have limited options. Example: i choose Drinks from the main category combo, the sub category combo will only have a list of types of drinks available.

This has probably been posted before, but to be honest i didnt know what to search for.

Tell me if you need any more information
thanks

View 2 Replies View Related

Lookup Box

Dec 18, 2006

I have a form which is used to enter contact details into my database. This includes the organisation for which each contact works. We have quite a few contacts from each organisation.

To ensure that the organisation name is always entered exactly the same, I'd like to use a lookup box which allows the user to choose the organisation if it's already in the system, or to enter it if it's new and not already there.

Is it possible to have a lookup box which shows the values already entered in the field to which the input will be stored?

Gary

View 2 Replies View Related

Lookup

Mar 2, 2005

I am setting up a form for a database.

It's supposed to be a form for adding a new booking to a table.

Now there's one table with vessels and a different one with lines/deadlines.

Every vessel is on a line that has a certain deadline.

My question: Is it possible for a user to select the vessel from a list on the form, having the form automatically look up the deadline and showing this in a different part of the form.

The meaning is to add a new booking with vessel and deadline into one table...

Don't know if my story is understandble, if not, please ask me to clarify...

Lion85heart

View 11 Replies View Related

Lookup

Feb 16, 2006

I have a user options form linked to a table. The table is just one record with an option group on the form. the user selects which report template they'd like to use. the user closes the form down and resumes normal data entry.

when it comes time to represent the data in a report, i'd like it to display according to the template type the user selected in the options form. I have 3 different report templates. They all say the same thing... one is just prettier than the other!! Users like to customise!!

in effect, i'd like the database to check which report template has been selected from the options table, then open the appropriate report.

It sounds kinda simple but i can't quite figure the code. I think i need to use a lookup statement somewhere.

Any ideas are appreciated.

View 3 Replies View Related

Lookup Box

Jul 6, 2006

I want to put a lookup box on my switchboard where I can type in Company Name and automatically open up the form in the correct Company. I have tried to do this through a query but this just brings up a full-list, also tried a macro but this wouldn't work. Can anyone help please?

View 4 Replies View Related

Lookup

Jul 28, 2006

I would like to create a look up for a field from a table - that displays the OfficeID and the officename when it pops up, but only store the value of the id in the table.

OfficeID officename
1 Office 1
2 Office 2

My lookup Row Source is:

Code:SELECT office.OfficeID, office.officename FROM office ORDER BY office.officename;

Only the OfficeID seems to show in the lookup.

How would I get both to show, but only the OfficeID to be put into the field?

View 1 Replies View Related

Lookup Help

Feb 20, 2008

Hi all
Im trying to create a database where one field has a lookup to another field in another table (easy enough done) the the next field in the first table has another lookup, however the items the user can select change dependent on what was selected in the first feild eg:
SelectA -A1
-A2
SelectB -B1
-B2
So the user can only select B1 in the second field if SelectB was picked in the first field

Does anyone know whow this is done

Thanks
Chris

View 1 Replies View Related

Lookup String

Sep 18, 2005

I have a 67 binary code string produced from a query which concatenates these 1's and 0's.

What I need to do is have access decide what a particular string value/range is and return the process name. e.g

11000000000000000000000000000000000001000010000000 00000000000000001. The process name would be COMP RESOLVED MSA


10100000000000000000000000000000000001000010000000 00000000000000001.The process name would be COMP UNRESOLVED MSA

00000000000000000111010000000110000000000000000000 00000000000000001

The process name would be MSA NEW

There could be about 60 different Process Names

View 1 Replies View Related

How Do Perform Lookup

Mar 10, 2006

Hi i really need help!

i need to be able to use "lookup", i have a set of postcodes from 3000 customers, i need to extract these and compare them to lists i have of postcodes, which make up a region. And run queries from these

e.g a customer on my database has the postcode BD21 7KK

On my list of postcodes i have on paper - WEST YORKSHIRE - BD21 7

therefore The BD21 7KK Customer falls in the West Yorkshire region.

I need to do this four 4 regions with lists i have on paper then run queries.

Can some one please provide the neccessary steps?

Or even give me an example made?

Im really stuck on this at the moment and me job depends on it ! :(

Thanks

View 1 Replies View Related







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