Lookup Field / Autonumber Woes

Jun 21, 2006

So, basically my database has quite a number of lookup fields in tables as there is much repeated data, each one references to a seperate table with an autonumber field (ID) and a text field (Value)

Currently I have column one (ID) as the bound column in such cases, as this is what the guy who started me on access said to do, and it's fine until I try and export any query with such a field to Excel.

I have found, through experimentation, that setting the 2nd column (Value) as the bound column allows me to export the values rather than numbers, but I don't know if this is a sensible thing to do? (ie, I don't know what other unexpected effects this might have)

Any guidance here would be very welcome, thanks,
Bogzla

View Replies


ADVERTISEMENT

Custom Autonumber Based On Lookup

Jul 8, 2013

Custom Autonumber based on lookup. I am creating an access database where autonumbers to be work.

I have a table with Segment Name my main table will lookup the values of segment table.

Based on the Segment I choose Autonumber has to be created

My main table to house each record (tbl_import) has the following fields:

ID
Segment
Port
MOT
TOTAL CIF

Child table - Segment contains
Development
Deployment

Testing

So based on segment field which I choose

Development autonumber has to set DEV-1001 and Deployment has to set DEP-2001, TEST-3001

My thought is if there a way to code the Segment field to lookup the segment what I choose based on the Autonumber series starts (similar to a vlookup in excel), then concatenate the DEV in the Record ID field.

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

Controlling Autonumber Field - Start Autonumber From 1 Everyday (Composite Key)

Nov 21, 2013

I have two tables linked to each other in one to many relationship. Instead of auto number, the date and shift (Text) is being used as the primary keys (Composite Primary Key). Here is the tables structures,

Payouts Table:
Date: Primary Key
Shift (Day or Night) : Primary Key

Bills Table:
Date: Primary Key
Shift (Day or Night): Primary Key
Autonumber: Primary Key

The tables Payouts and Bills has one to many relationship. One payout row can have many bills. The problem is that I want to start the Autonumber in bills table everyday from 1. As date and shift are different for every day so even if i start bills from 1 everyday, it wont make same primary key. I can do it manually but I want to make it automatically.

View 4 Replies View Related

Relationship Woes

Apr 20, 2005

The database for workers works ok from a solitary table, tblEmployees.

I want to make it a relational db.

I’ve incorporated lookup tables. But I’m lost about what to do next – and if it should be divided further.

I’ve studied many tutorials in relationships, but I don’t find one that resembles this one.

Could a relationship expert give advice please? I've included a sample, hoping this will be simplest way for you to understand the challenge.

View 14 Replies View Related

Alias Woes

Sep 25, 2007

so, I have created a working SQL statement that summarises data from a bunch of different tables (it's a stock monitoring application so it all has to do with levels of stock, numbers of parts processed etc...):

SELECT tblPPIn.BatchID,
tblPartDescriptions.DrawingNumber AS [Drawing Number],
tblOrder.IssueNumber AS [Issue Number],
tblPartDescriptions.Description AS [Description],
tblPPIn.Qty AS [Total Booked In],
IIf(IsNull((SELECT Sum(tblPPProcessed.QtyProcessed) AS SumOfQtyProcessed FROM tblPPProcessed WHERE tblPPProcessed.BatchID = tblPPIn.BatchID;)),'0',(SELECT Sum(tblPPProcessed.QtyProcessed) AS SumOfQtyProcessed FROM tblPPProcessed WHERE tblPPProcessed.BatchID = tblPPIn.BatchID;)) AS [Total Qty Processed],
IIf(IsNull((SELECT Sum(tblPPOut.Qty) As sumofQtyOutPass FROM tblPPOut WHERE tblPPOut.BatchID = tblPPIn.BatchID AND tblPPOut.IQCPass = 'PASS';)),'0',(SELECT Sum(tblPPOut.Qty) As sumofQtyOutPass FROM tblPPOut WHERE tblPPOut.BatchID = tblPPIn.BatchID AND tblPPOut.IQCPass = 'PASS';)) AS [Total Good Parts Taken],
IIf(IsNull((SELECT Sum(tblPPOut.Qty) As sumofQtyOutUninspected FROM tblPPOut WHERE tblPPOut.BatchID = tblPPIn.BatchID AND tblPPOut.IQCPass = 'UNINSPECTED';)),'0',(SELECT Sum(tblPPOut.Qty) As sumofQtyOutUninspected FROM tblPPOut WHERE tblPPOut.BatchID = tblPPIn.BatchID AND tblPPOut.IQCPass = 'UNINSPECTED';)) AS [Total Uninspected Parts Taken],
IIf(IsNull((SELECT Sum(tblPPProcessed.QtyPass) AS SumOfQtyPass FROM tblPPProcessed WHERE tblPPProcessed.BatchID = tblPPIn.BatchID;)),'0',(SELECT Sum(tblPPProcessed.QtyPass) AS SumOfQtyPass FROM tblPPProcessed WHERE tblPPProcessed.BatchID = tblPPIn.BatchID;)) AS [Total Passes],
IIf(IsNull((SELECT Sum(tblPPProcessed.QtyFailEtching) + Sum(tblPPProcessed.QtyFailCutOut) + Sum(tblPPProcessed.QtyFailFlatness) + Sum(tblPPProcessed.QtyFailHandling) + Sum(tblPPProcessed.QtyFailOther) AS SumofFails FROM tblPPProcessed WHERE tblPPProcessed.BatchID = tblPPIn.BatchID;)),'0',((SELECT Sum(tblPPProcessed.QtyFailEtching) + Sum(tblPPProcessed.QtyFailCutOut) + Sum(tblPPProcessed.QtyFailFlatness) + Sum(tblPPProcessed.QtyFailHandling) + Sum(tblPPProcessed.QtyFailOther) AS SumofFails FROM tblPPProcessed WHERE tblPPProcessed.BatchID = tblPPIn.BatchID;))) AS [Total Fails],
[Total Booked In]-[Total Qty Processed]-[Total Uninspected Parts Taken] AS [Total Unprocessed Parts Remaining],
[Total Passes]-[Total Good Parts Taken] AS [Total Good Parts Remaining],
[Total Passes]/[Total Qty Processed] AS [Overall Yield]
FROM tblPPIn INNER JOIN (tblPartDescriptions INNER JOIN tblOrder ON tblPartDescriptions.DrawingNumber = tblOrder.DrawingNumber) ON tblPPIn.BatchID = tblOrder.BatchID
ORDER BY tblPPIn.BatchID ASC;

don't worry about the details, it works as it is above...

now I only want to display data for batches where there are some parts left, so I've tried adding the following WHERE clause:

WHERE ([Total Good Parts Remaining] + [Total Unprocessed Parts Remaining]) <> 0

should work fine, right?
nope, we get the (all too familiar) 'Enter parameter value: Total Good Parts Remaining' (and the same for 'Total Unprocessed Parts Remaining'), despite the fact I have used these aliases in the previous SQL with no problem...

Is there any way around this or do I have to create a big-ass WHERE statement complete with the subqueries I've already used previously?

This is seriously annoying me today... any help would be massively appreciated!

cheers,
Bogzla

View 7 Replies View Related

Round Up Woes

Jan 22, 2008

Hi,

I am running a query that has this function

MyRoundedValue: Round([Bonus Total],2)

I am trying to round up the value in Bonus Total.

Currently the result shows 5140.602 and I want it to round up and show 5140.61

Is this possible? For the life of me I cannot figure it out..

Thanks

Fen How

View 1 Replies View Related

Sub Form Woes!

Mar 9, 2005

I have a subform on my main form which I can access properties etc without error, but when I try to set the sourceobject property I get an error saying it can find the object '~sq_cfrmAction~sq_csubPlanetItems'

My form is called frmAction

The subform is called subPlanetItems

The code that errors is this;

Me.subPlanetItems.SourceObject = "qryInPlanetNotInWIMS"

The query runs fine so it is not that?

Help please

View 2 Replies View Related

Username & Password Woes!

Jan 10, 2007

Hello!
I have a problem regarding using usernames and passwords to restrict access to certain tables/forms/reports etc....
I have read around the forum and various other websites but cant seem to get much relating to exactly what i am wanting to do.

I think i understand the way the access workgroup security works. But does this not just restrict users being able to view the database as read-only or with other certain rights like that? So, firstly would i be able to use this to restrict the database the way i want?

Or is there a way to create a table with names and passwords and create a form at the beginning where the user inputs their details and then according to the details gives/restricts access to parts of the database? Ideally i'd like the startup form to direct them to a different menu according to the user which gives them only the options they are allowed?

Seems a bit of a mouthfull and i sound like a complete newb but i been trying to figure this out all day!!
Thanks

View 2 Replies View Related

Importing From Excel Woes !!

Jan 11, 2007

Hi all,
I have been using Excel data in Access either by importing the sheet as a table or directly linking to the sheet with no problems in the past but today I cannot seem to get the data to import in the right way.

The column on the Excel sheet is mainly populated by numbers but some of the values have letters in them. When I discovered this I formatted the column as text and tried to directly link to the sheet but the datatype kept insisting it is number. I then decided to import the sheet as a table and although it comes in as Text instead of seeing the value A1030573 in comes in as 7.1e+009 and this goes for the values that are purely numbers.

Is this a known bug, does anyone have a solution to to this ?

Thanks in advance,
Mitch....

View 3 Replies View Related

Access Printing Woes.

Mar 19, 2007

Here's a weird problem I've had develop in the past couple months, before I upgraded to 2007, and now since I upgraded to 2007.

I've had the same Access database since 1997, and just recently upgraded it to Access2007, but as I said the problem occurred before and after the changeover.

I have two servers at the office. Server #1 (where the database is located) has attached to it is a dot matrix printer, used for printing our 4 part invoices/packing lists. I have another server (#2) which has a laser printer attached to it. The laser printer on server #2 is the default printer for all computers in the office. I have a lot of reports in Access where the printer to be used is the default printer. I have a single report in Access where I specified in the page design and layout to use a specific printer - the dot matrix on server #1.

Both servers are always on. Both printers are always on. I can go for weeks and weeks with no issues in printing the invoices. Then suddenly I'll get a

"This document was previously formatted for the printer (printer name) on (server #1), but that printer isn't available. Do you want use the default printer (\server#2laser printer) ?
OK CANCEL SETUP... HELP

It worked fine for 9+ years, and now I am getting this error. No new computers in the last 2 years. No new printer installs in the last 2 years.

I've gone through, uninstalled the printer, reinstalled the printer, both on the server and remote machines, and now I can't even get the report to "remember" that I want it to always print to the dot printer.

Any ideas?

View 1 Replies View Related

Duplicate Entry Woes

May 30, 2005

I have a table that has (to simplify things) two fields.

[Patient_No] [ID]
BA4206 1067404
BA4206 1067405
BG1013 1067545
BG1013 1067546
BG1013 1067547
BG1111 1078432

I want to be able to count the number entries where the Patient_No is the same and output the query like this:

[Patient_No] [ID] [COUNT]
BA4206 1067404 1
BA4206 1067405 2
BG1013 1067545 1
BG1013 1067546 2
BG1013 1067547 3
BG1111 1078432 1


Hopefully this is just a simple query but for some reason i cannot get it to work.

Any help is much appreciated.

Thanks in advance

View 7 Replies View Related

Record Saving Woes

Mar 16, 2006

Ok, here is my scenario.

I have several FE's each saving in their own BE. They are all the same but for different areas of our business. Each has around 20-30 users. I recently introduced another form into the FE that has linked tables to another different BE in another folder. Each FE out there with its own BE now has this form and all of the new forms save to the same (one) BE. Ok, got it?

Now, sure its possible to have them all together and I would anticipate someone suggesting this. Its split up to keep sizes down and performance up among other reasons.

In any event, here I am. All of the new form introductions went smoothly without a hitch. The last one however is causing trouble. On submit an e-mail is sent, the user is asked if they want to submit another form, and if yes a new record is created. If no the form is closed.

E-mails are always sent, no problem. The trouble is saving the record. All except one of the different FE's I have out there in different folders save the record into the table just fine. There is one though that does not do this. The mail is sent and the program behaves normally with no errors but the record is not saved. This does not happen to all users of this FE either. There are some users that work fine and the record is saved in the BE yet other users do not save the record. You can see the .ldb appear and disappear. Our IT dept has been through the permissions time and time again and tell me they are ok. The FE and main BE are in one folder while the BE that the new form talks to is in its own folder. Remember, this works fine for several other instances, its just the one that doesn’t save the record.

I did have a chance to see the permissions the other day and it seems a mess to me. They have users in individually, as they were set up initially and the same users are also in there in a group and maybe 2 groups. The permissions look a mess to me… they really do…. but that doesn’t necessarily mean they would not work and can be blamed. I have no control over this part and it drives me nuts!

What I have done...... copied a working FE from another area into the troubled folder. No good. I have removed the new form along with its linked tables and the record is saved. Put the form and linked tables back in and it stops saving again. The code compiles just fine. I have done compact and repairs.

Any thoughts or ideas out there??? If you need more info ask. I understand what I wrote but you might not LOL

View 8 Replies View Related

ODBC Driver Woes!

Apr 29, 2005

I'm sure you've all seen this before - but, it's killing me. It's for a university project which is being demonstrated soon, and I can't get it working consistently!

When pages are loaded, I get the error -

Provider Error - 80004005, Unspecified Error /db/update_select.asp line 33 (line 33 is the connection to the database)

or

Internal Server Error 500 - Page cannot be displayed

And sometimes I get one about "Jet" "Threads", and ODBC stuff.

I'm guessing it's a driver problem, but I have no idea where to go from here! I'm running Windows 2000 Adv. Server, IIS 4 (I think) and my db is access 97 :O (I would have put a newer version on, but the CD-Rom is so old on the PC it won't take 700MB CDs! Argh.)

Any help would be greatly appreciated!

Ally
www.ally.nu

View 1 Replies View Related

Rowsource Of Lookup Field Dependent On Field Value In Same Record In Subform

Jul 6, 2014

I want to create a different rowsource-query for a lookup field (field1) in each record in a subform. The rowsource changes dependent on the value in another field (field2) in the same record. How can this be done?

- I tried to change the rowsource-query in an eventmacro when the focus is set to field1, but this ofcourse changes the rowsource for all field1's and makes the allready selected values unvisible.
- I think I have to include the value of record 'field2' in the rowsource query, but i cannot find a way to include that value in the query.

Something like:

Lookup field1 in the subform contains this rowsource
- SELECT CUSTOMER.Id, CUSTOMER.AGE, CUSTOMER.NAME
FROM CUSTOMERS
WHERE (CUSTOMER.AGE= me![field2]);
me![field2] however does not function

View 5 Replies View Related

Relationship Woes With Specific Query

Mar 9, 2006

I have a pretty standard relationship set up, with the following tables:

Customers: A row/Cust ID for each customer
WorkOrders: each customer can have multiple work orders (linked to Customers by CustID, individual ID is WOID)
Jobs: each work order can have multiple job records attached (linked to WorkOrders by WOID, individual ID is JobID).

As far as I can tell, they're fine and all other forms etc work, updating no problem, referrential identity is enforced etc...

Problems: When I go to make a "job allocation" query for subsequent form, I select: Customers, Work Orders and Jobs table (I then filter by location, but
this problem remains unfiltered also). They link up fine. The query isn't nonsensical either - it lets me add new data. BUT instead of showing all the customers and work orders for the location due for the location, it will ONLY display the records that have details in the Jobs table (the lowest in the relationship chain). Basically, If the jobs sections are empty or "unattempted", then NO details AT ALL will show up in the query. Which is a problem, because I want to see ALL the "unattempted" jobs in the area to allocate them, including customer data and work order numbers. I also need to have the jobs table present, so I can allocate a job date, a contractor etc.

I'm not sure what to do. As far as I can see, the set up I have IS very standard tables/relationships-wise. I have to work it out, otherwise I'm going to have to revert to some kind of 'super-table' (like in our old system) - which I am at loathe to do - I don't want to merge Work Orders and Jobs because that means a lot more typing for me.

Would cascade update in the relationships do anything? (it is checked).

I've been away from Access for awhile and I'm just drawing a blank on this one. Any help greatly appreciated. Thank you.

View 2 Replies View Related

Update/amend Querie Woes!

Mar 23, 2007

Hello,

I have a table exported from excel. I intially imported this in to access to form a list of due dates for services.

Every week I get and e mail with the updated version.

I am trying to figure out how to update the dates in the 1st table with the new weekly ones.

I can't get it to update. Also there may be the addition of new services as well.

Any tips would be grealty recieved.

Many thanks in advance.

View 2 Replies View Related

Null / Non Existent Values And Query Woes.

Aug 12, 2006

Hi there.

I've attached my db in the hope someone can help my head scratching.

I have got a Sales summary table with several other related table. Most notably, a table with the items in the sale and one with the costs. Because each sale might contain many different items and many different costs, I thought seperate tables were the way to go.

All I'm trying to do is make another query that gets the total sales (That's adding each line item * quantity) - (Each cost line item*it's quantity) and then finally the margin made on the deal.

However, if there are no costs or sales involved in the sale the query ignores it. (Sounds odd, but some transactions might be cost free, and some may not involve any revenue - so I have to bear it in mind).

I tried the Nz function, but It's either not what I need or I'm doing it wrong.

How do I get this to work?

Many, many thanks!

View 2 Replies View Related

AutoNumber Field

Mar 4, 2005

I have a table with 6000 records. The last autonumber is 8810 and now my next autonumber wants to start at 2752. Is there a way that I can renumber that entire field to number correctly? I have tried compacting and repairing the database. Your assistance is appreciated.

View 5 Replies View Related

Re-set AutoNumber Field

Mar 8, 2005

Good Afternoon Dudes

I have deleted all records from a database and wish to re-set an autonumber field back to 1.

At present when we start re-entering records it starts from record 769 where the old records finished.

Can you please advise how we can do this.

Thanks

View 2 Replies View Related

Autonumber Field

Oct 19, 2006

hi
I want to start value in autonumber field at certain number than 1
ex. start autonumber at 1000 then 1001 ......
how
thank you

View 2 Replies View Related

Help Please, AutoNumber Field

Sep 7, 2005

I have an autonumber field that somehow got reset back to one. Is there anyway to reset this number, I need it to be back around 1900.
This is a big problem because I use the auto number as an order number and also use that number to link the options selected to that order. Now that it has reset to one, it is picking up options from the original order number one.
Any suggestions?

Addtl Info. This is in an Order Table. When the order is ready for manufacturing it is assigned a serial number and the order is deleted from the order table and put into a production table.

View 8 Replies View Related

Lookup 2 Field To Auto Fill Another Field?

Dec 30, 2012

Is it possible to look up 2 field to auto fill another field?

Field 1 is "Exposure" this autofill with "Probability" is user input.

I need to lookup Exposure and Probability and autofill a score in to "Risk Rating". This to stop incorrect data being inputted.

I have a table with all the results combination in it.

Would it be possible to use a Dlookup to look at Exposure and Probability to give me the score

I tried a Combox with autofill. But the power to be would like it done without user input.

View 11 Replies View Related

How To Renumber An Autonumber Field...

Oct 3, 2005

Hi

I want to renumber an autonumber field to remove the gap appear after deleting the record.

I know it is possible by deleting field and creating a new autonumber field having same name.

But all this I want to do with code.

I will be gratefull if any one help me.

Regards

:confused: Rahulgty

View 7 Replies View Related

Resetting AutoNumber Field???

Sep 15, 2005

could someone please tell how i can reset an autonumber field to start from 1.

basically i have created a table and carried out a number of test with useless data. now that i have the table set up the way i want it and i have tested the queries etc i want to delete all the current data in the table and begin filling it with correct data. however i want my primary id to start from 1 which at the moment it doesn't because i have just deleted 50 records.

thanks in advance

View 2 Replies View Related

Refreshing The AutoNumber Field.

Jul 9, 2006

I had a table with an ID field defined as AutoNumber. It contained a large number of records. When I deleted those records, and added a new record, it was alloted an ID which was an increment of the last ID when the Table was full previously.

I want that the AutoNumber ID be ReNumbered from start if any record is deleted.

View 4 Replies View Related







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