Tables :: Disable A Record From A Table Based On Attribute Of Another Table
Jan 12, 2013
I have a keys table and a keysctivity table. I need keys to not be available if they are currently signed out (return_date is null) or if they have been marked as lost (lost_key = true)
This is my activity table. URL....If for example signin_id 1 was not returned or was lost, key_id 1 should no longer be available. Is this something that can be done?This is the access file I am working on: URL....
create two new tables "lostKeys" "unreturned_keys" and have records moved to their respective tables based on whether they are indicated to be lost or currently not returned.
View Replies
ADVERTISEMENT
Feb 18, 2013
I am using Access 2010. I have many tables that are downloaded from SAP into Access.
Within each table structure are the following standard Access attributes: Field Name Data Type Description
When I create a query I add the Field Name from the table nothing earth shattering here. But, in addition or instead of Field Name, I want to use the Description attribute. Mostly because the SAP field names are acromyms in German and are useless to the untrained eye. Please see attachment as an example.
Is there a way either using VBA or some special SQL language in any query I write to show me the Description instead of or in addition to the Field Name?
View 1 Replies
View Related
Oct 13, 2006
Hi everyone,
Need some help here! I have a table where different types of records are recorded. Let say for argument's sake my tblMain looks like this:
RecID (autonumber)
EntryType (Combo box linked to my tblEntryType)
Field1 (text)
Field2 (text)
I then have tblEntryType which lists the different types of entries to be made and which fields are required on my form and what the lables should be. The structure looks more or less like this:
EntryID (autonumber)
EntryName (text)
Field1Req (true/false)
Field1Tag (text)
On my form, my record source is tblMain. When my user makes a selection in the combobox EntryType, there is a lot of code behind the AfterUpdate function like this:
If EntryType.Column(2) = True Then
Me.field1.Enabled = True
Me.lblfield1.Caption = Me.entrytype.Column(3)
Else
Me.field1.Enabled = False
End If
I find this setup a bit labour intensive, especially as my form has quite a few fields! Is there a way that I can "look up" which fields are required from the table and enable/disable and label based on my tblEntryTypes without me having to creating so much code/use the "column" function.
Let me know if I am not making myself clear and I will be glad to try explain so more!
Tx in advance,
Mel
View 1 Replies
View Related
Oct 13, 2006
Hi everyone,
Need some help here! I have a table where different types of records are recorded. Let say for argument's sake my tblMain looks like this:
RecID (autonumber)
EntryType (Combo box linked to my tblEntryType)
Field1 (text)
Field2 (text)
I then have tblEntryType which lists the different types of entries to be made and which fields are required on my form and what the lables should be. The structure looks more or less like this:
EntryID (autonumber)
EntryName (text)
Field1Req (true/false)
Field1Tag (text)
On my form, my record source is tblMain. When my user makes a selection in the combobox EntryType, there is a lot of code behind the AfterUpdate function like this:
If EntryType.Column(2) = True Then
Me.field1.Enabled = True
Me.lblfield1.Caption = Me.entrytype.Column(3)
Else
Me.field1.Enabled = False
End If
I find this setup a bit labour intensive, especially as my form has quite a few fields! Is there a way that I can "look up" which fields are required from the table and enable/disable and label based on my tblEntryTypes without me having to creating so much code/use the "column" function.
Let me know if I am not making myself clear and I will be glad to try explain so more!
Tx in advance,
Mel
View 1 Replies
View Related
May 27, 2013
I have a table form (I want to have many records available in the screen)
I want to disable fields based on a value of another (main) field.
The fields are check boxes, so the automate formatting is not available.
I use the VBA code below:
Select Case name1
Case "POINT"
Me.sf1.Enabled = False:
Case "SIDE OUT"
Me.sf2.Enabled = False
Case Else
Me.sf3.Enabled = False
End Select
but the fields become disable to all records, not only to the records under the right condition. Why?
View 2 Replies
View Related
Feb 4, 2015
In Access2010 I have created a linked table to a SQLServerExpress database.I have a user in SQLserverExpress with only reading rights.This linked table is used in a form which only shows the information. When opening the form, it prompts for the SQLserverExpress username and password.How can I configure the linked table so that it logs in automatically with the SQL user I prefer so that the user does not need to enter a user / password?
View 3 Replies
View Related
Mar 10, 2015
I am trying to assign teams to players. I have an import table with all of the players information listed. What I want to do is determine the count of players in a given city. For every 9 players I want to add a new record to the Team table and assign the team number (auto incremented for each team created). Then I want to add the players to the Players table with the Team Number that was created.
View 8 Replies
View Related
Jan 16, 2007
Hi
I am running Access 97 and I was wondering if it was possible to change the colour(background or text) of a single record based on an attribute
I was hoping that my subform, viewing all of the records (datasheet) would look like this based on Task Des column
eg Condition = red, Awaiting = Blue
(Below is ment to look like an access datasheet view)
Property No | Task Des | MCU/ROL
PN1234/DA1 | Condtion | MCU
PN1235/DA2 | Condtion | ROL
PN1994/DA1 | Awaiting | MCU
Thanks heaps for your help
View 1 Replies
View Related
Oct 7, 2013
I am creating this temporary table on the fly I find I need a default value of zero for the field [GrpCount] . However I can't find the correct code to set this default value? I'm assuming it's an attribute
Code:
Set tbldef = DB.CreateTableDef("tblTempLkp")
With tbldef
.Fields.Append .CreateField("ID", dbLong)
[Code]....
View 4 Replies
View Related
May 29, 2014
I have two tables of data, each relating to three business branches (branches A, B and C).
Table 1 shows the expenditure of each branch (by fuel, premises and wages).
Table 2 shows a number of units for each branch (mileage, floorspace and sales).
What I would like to do is calculate unit costs, based on the expenditure in Table 1, divided by a relevant unit in Table 2. The catch is that I want to have a third table which allows the user to specify which expenditure (from Table 1) is combined with which unit (from Table 2) to generate the calculated unit costs. I've been able to do this in Excel, and have attached an example. I've also attached an incomplete Access version with the first two tables. Given the complexity of my actual data, I feel this could be better handled in Access than Excel.
View 6 Replies
View Related
Aug 2, 2013
I have started work on a database to track the many (several hundred per annum) projects my company undertakes. A 'main' table lists projects, their fees, their key dates, their project numbers, etc. I have created another table for tasks. Each task is assigned to a project (via the project number), and may be 'open' or 'closed'. I have separated the tasks table from the projects table as there may be several different tasks for each project. It is also good to keep a record of the tasks.
I want to prepare a report from the projects table that lists projects IF they have any open tasks.
In my mind, this means 'If a task, with the corresponding project number, is open, put a 'Yes' in the 'Tasks open' field of the Projects table.'
View 7 Replies
View Related
Oct 10, 2014
I want to Delete all records from the Table Named "CustomerWiseRotaryTillerRates" (Given Below) if the State in the State Filed in found in the "Customer_Master" Table (attached Herewith). What will be the correct procedure ?
I followed the steps referred in page no. 67 & 68 in the Book "Microsoft Access 2007 Data Analysis" by Mr. Michel Alexender.
Customer Name
State
Product_Code
Product_Name
Price_perunit
TSI Engineering Indutries (P) Ltd.
Assam
P_05
1500_Rotary_Tiller_220_RPM
Rs. 63,722.00
Kishan Krishi Engineering Works
Jharkhand
P_05
1500_Rotary_Tiller_220_RPM
Rs. 62,997.00
TSI Engineering Indutries (P) Ltd.
Assam
P_06
1750_Rotary_Tiller_220_RPM
Rs. 66,663.00
Shri_Tata_Enterprises
Bihar
P_06
1750_Rotary_Tiller_220_RPM
Rs. 65,683.00
View 1 Replies
View Related
Apr 17, 2007
Hello,
I have attached a zipped excel workbook to best describe what I'm trying to do. I have table1 and table2 and I'm trying to write a query in access to get the output as shown in the workbook. I'm having hard time getting this right. I would appreciate your help if possible. Tks
Richard
View 4 Replies
View Related
Jun 12, 2013
When I started building forms to fill my junction tables, the example that I looked at based them all off of queries. That's what I've done for the most part. However, this latest subform that I've made and embedded into a main form is based off of a table. Will that cause problems for me down the road? I'm not so far with it that I can't redo it off of a query, I just don't want to!
View 3 Replies
View Related
Nov 25, 2013
I attached a screenshot with notes that describes my problem.
View 2 Replies
View Related
Sep 29, 2013
How can I update (some columns) in a table from the same table based on a Criteria column in the same table.
View 2 Replies
View Related
Dec 23, 2013
I have got problem with ms access report. I want to make a report which is based on
1) first master table
2) first slave table
3) second slave table
I have done some research and decided to do some form with subform. So I have got the view one record from master table and many record from slave tables in one view.
But it turned out that it has become duplicate records. (the relationship are ok - it duplicate master record as many as slave records)
So:
1) how i can do ms access report from multiple tables - one master record with multiple records form slaves tables
View 5 Replies
View Related
Oct 22, 2012
Currently I keep getting this error: "You cannot add or change a record because a related record is required in table"..My current tables are this:
Primary Table with persons info:
Primary Key - Auto number generated
Name
Address
Email
Phone
I have 4 other tables with use check boxes.
ex:
Table 1 - Geographic locations visited
ID - Auto generated
USA
CANADA
ASIA
ECT...
Table 2 - Languages Spoken
ID - Auto generated
Spanish
Chinese
English
Table 3 - Skills
ID - Auto generated
Hunting
Dance
Singing
Weaving
Is this not a genuine one-to-one relationship table? I mean No two people would have had visited the same places and speak the same language no? I tried to create a one to one relationship with the primary key to the auto generated ID of the child tables but I'm sure that is not how you do it. Also when I try to save the check boxes in my form and I close it and come back it doesnt save and is blank again. Is it because my form gets its information from a query that takes all the information from all the tables.
how I can get this to work properly? Am i to make use of a foreign key? I've read a lot about it online and watched youtube videos but I dont see why I need it here in this case. Is there a way to set the IDs in the child tables to be the ones from the primary table? Or do I have to use a foreign key and manually input the primary ID into them?
Or would it be better to have all these child tables in the primary table and have one large table instead? I just didnt do that because one of them has like 20 checkboxes with cities and locations
View 12 Replies
View Related
May 25, 2007
I have a temporary table with all text fields for importing data to a normalized table. In order to import I need to prep the data by pulling the numeric values of "lookup" type fields (nb. not actually using MS Access lookups)
My prep query is producing 9 more records than there is rows in the import table, even though every join is a LEFT join, which should just pull all import rows and match up lookup values where they are available.
eg. of import table (all fields are text)
Location;
Group;
Name;
Wfm type;
Account Number;
WFM Status;
Date Created;
Date Held To;
processdate
Beachville Operating Centre;
Service Orders;
DAVID JONES;
;
Complete Engineering Investigation;
Completed;
4/20/2007;
;
4/27/2007
here is my prep query (the iif is to replace userid's that can't be found with UNKNOWN)
SELECT lookup_location.val AS F1location, lookup_group.val AS F2group, IIf([lookup_user.val] Is Not Null,[lookup_user.val],"UNKNOWN") AS F3user, wfm.wfmcode AS F4wfmcode, CURPW020_import.[Account Number] AS F5account, lookup_status.val AS F6status, CURPW020_import.[Date Created] AS F7datecreated, CURPW020_import.[Date Held To] AS F8dateheldto, CURPW020_import.processdate AS F9processdate
FROM ((((CURPW020_import LEFT JOIN lookup_location ON CURPW020_import.Location = lookup_location.txt) LEFT JOIN lookup_group ON CURPW020_import.Group = lookup_group.txt) LEFT JOIN lookup_user ON CURPW020_import.Name = lookup_user.txt) LEFT JOIN wfm ON CURPW020_import.[Wfm type] = wfm.wfmname) LEFT JOIN lookup_status ON CURPW020_import.[WFM Status] = lookup_status.txt;
any assistance would be much appreciated. any other info needed let me know.
View 3 Replies
View Related
Jun 23, 2005
I've 2 tables:
customers
-id
-customer_name
-city_id
cities
-id
-city_name
I've a form to create new customers accounts.
The form has a drop-down control listing the cities in the "cities" table.
This drop-down control has a hidden column (id) and a visible column (city_name).
The user can choose a citie from the list and the city id (1st column in the drop-down list)
will be stored in the "city_id" field in the "customers" table.
Problem:
I need to allow users to enter cities not listed in the drop-down control.
When they entrer a new city, I need to create a new record in "cities" table for the new city.
I tried opening a dialog using the NotInList event, and the dialog pops up as espected, but also pops up an ugly msgbox wich says that the typed text isn't a listed item.
Please help :-(
View 1 Replies
View Related
Jul 30, 2007
Hey all,
I am working on converting someones Paradox Database to Access and making some modifications.
I have a table with people in it and they are linked to a number of interests. But i am struggling to create a query so that on each page of the form for the person i can call the interests and display them on the form as a list...
If anyone could point me in the right direction that woul dbe appreciated!
Give me mysql and a bit of php anyday!! hehe
I am using Access 2007 but i have used access before so i should be able to work my way through instructions for 2003.
thanks
RF
View 4 Replies
View Related
Aug 8, 2013
I have a field in a table that is to be concatenated from two other fields, PolPrefix and PolNum. On a form I got it to show the full field 'PolicyNumber' by making the control source =[PolPrefix] & [PolNum].
But this doesn't update the field PolicyNumber in the respective table, and only shows it on the form. How do I get a concatenated field defined by the user into a table so that I can call that field other places in the database?
View 3 Replies
View Related
Aug 6, 2015
I created two tables, let's refer to them as Cars (VW, BMW and Audi) and Colours (White, Black and Grey).
Is it possible to create another table based on these tables - i.e. in the new table the rows will be the Cars and the columns the Colours as such:
White
Black
Grey
VW
BMW
Audi
And should I enter another Car or Colour in one of the first mentioned tables, then I would like this "new" table to update automatically. For example, if I have a new Car (say, Merc), then I would like the "new" table to update to the following:
White
Black
Grey
VW
BMW
Audi
Merc
View 2 Replies
View Related
Aug 29, 2014
I Have a table with 15000 entries. This table lists components we use. This table is used to generate queries/forms. I have been asked to add a hyperlink to this table to link to a drawing of the component. All the drawings are in PDF and in the same folder. I am looking for a way to automatically update the hyperlink fields all at once. The Hyperlink will be in the format of servershareddrawings12345.pdfwhere 12345 is the component name from the table.
But there are a few small problems with the component names.
1. If the component begins with a B- . The drawing name will be all the characters except when there is a second dash in the component. So if the component is B-12345-678 the drawing name will only be B-12345.
2. If The component begins with AB, The drawing will be the first 5 characters regardless of what follows, e.g. AB123.
3. Finally for all other components the full component name will be the drawing name.
Putting the naming to one side, how to go about auto generating the hyperlink. I have posted this in the table section, but maybe this should be in another section like queries or VBA.
View 2 Replies
View Related
Nov 5, 2013
I have a form that users can input data into and based on that data it runs a query and generates a report. These reports can be different based on user entered data on the form. My issue is within the report I would like to sum certain fields. The problem with trying to sum theses fields is that they show up on each row so I have hidden duplicates but when trying to sum the field it still trys to count the hidden duplicates thus giving a value that is of no use.
I have tried many methods to sum but one of the problems I continue to run into when I create a text box and build an equation and reference the field I would like to sum is when the report runs it is asking for a value to be entered for the field I am attempting to sum. I shouldn't need to enter a value as I am trying to obtain the value.
View 13 Replies
View Related
Feb 7, 2014
I'm quite new to Access and am just working on a little practice database where I keep track of sales of a product.
Basically I have a table keeping track of the different types of products, a table keeping track of customers, a table for orders and one for replenishments of stock. I have a query that calculates the stock of each type of product based on replenishments and sales.
Now I want to make sure that a customer can't order any more than there is in stock. I know you can restrict what's entered into a table with a validation rule but that's only for static restrictions. After searching the internet for an answer I've pretty much learned that I can't really make this restriction directly in the table, correct? But then how can I achieve this? Do I have to restrict the amount through a form somehow?
View 3 Replies
View Related