Forms :: Assigning Multiple Entries In One Table To A Single Entry In Another Table
Jul 24, 2013
I've got a table tblPatienten, a table tblRechnung and a form frmRechnung.
The primary key in tblPatienten is KundenNummer, the primary key in tblRechnung is RechnungsNummer. The relationship between tblPatienten and tblRechnung is one to many.
Now, every patient (stored in tblPatienten) is allowed to make multiple orders (stored in tblRechnung).
How can I assign each new order entry in frmRechnung to an existing patient in tblPatienten?
Hello friends,I have a pretty noobish question. I was wondering if it was possible to have several (3 in my case) different forms that apply data to a single table? The main table has three different types of data: 1. Client info 2. Services A 3.Services B. Each type of data has about 7/50/12 different fields of data in each set so that trying to include all this data on a single form is not very user friendly due to clutter.I have three forms that input data into the table, however the record navigation command buttons that I have on the forms do not apply the data to the correct record. For instance, when I input the Client info for client #2, and click the "open services A form" command button, the form opens on client #1 Services A instead of to a new record. Is this something I have done wrong, or is it due more to MS Access limitations? Thanks
I am trying to create a lookup wizard to record the number of people who attend a regular event. I have a table recording the names, surnames and DOB of registered members and a number of other tables for regular events we hold. Previously people have been manually adding the names of attendees and of course there have been inconsistencies in the data. I want them to look up the names from the table of registered members. I have been using the lookup wizard, but it is only displaying the first name in a string. I need it to display id, first name, surname and DOB in a table. I also want to be able to type in the first letter and then pick from the list.
I'm fairly new to access and have been tasked with fixing a database that to my knowledge is built incorrectly but due to budget constraints and the time it would take to build a new one, we have to stick with this one. Here's my problem, in the database is a form that we use to create new entries in a table but when I try to create a new entry through the form, it creates multiple entries in the table with the rest of the data split between all the new table entries. Is this something that is caused by us moving over to the most current version of Access? Is there a way to fix this problem given the software we are using? At one point I had recreated this table because we had been having issues with other aspects of the database (security deposits were not being updated when entered through this form).
Basically I am inputting stock into my database so I can have a record of what I have left and who it's gone too. Where I'm stuck though is when I want to add an item that I have more than one off but only enter it once and have it assigned a unique stock ID number (this is in the form of an autonumber) for however much quantity I choose to enter. So for example I have 5 keyboards, I type in 'Keyboard' into my item field (named txtItem) and then type '5' into my quantity field (named txtQuantity). When I then press Add Stock (named btnAddStock) I should then see in the table, 5 separate Keyboards listed each with a different Stock ID number.
I'm developing a simple sporting records db. I have a 'Competitor' table listing competitors as follows: CompetitorPK, Name, Division, Club. I have a 'Contest' table listing contests as follows: ContestPK, Competitor1_FK, Competitor2_FK, Winner_FK, Score etc. My question is have I modelled tables correctly i.e. CompetitorPK will appear in three columns of Contest table. How do I define this relationship? What alternative is there to what I have done.I intend to use forms to populate both tables (independantly obviously).
I am using Access 2002 database with ASP.NET(VB). I usually try to get something working in the access 2002 GUI 1st and I am having trouble with creating the code to require that a field entry be forced to be another exisiting entry in another table. For Example:
UNIT_TABLE has fields UNIT_ID(key), and UNIT_NAME having values of: 1 Tigers 2 Bears 3 Sparrows
BATTLES_TABLE has fields BATTLES_ID(key), ATTACKER_MAIN, and DEFENDER_MAIN
I want the ATTACKER_MAIN and DEFENDER_MAIN choices to ONLY be members from UNIT_TABLE.UNIT_NAME
I set up a combobox and lookup in BATTLES_TABLE as follows: SELECT UNIT_TABLE.UNIT_NAME FROM UNIT_TABLE ORDER BY UNIT_TABLE.UNIT_NAME;
this OFFERS the CHOICE of any of the 3 clans (ie Tigers, Bears, Sparrows)
but I cannot not FORCE the USE of these....because the end user can option to enter in anything else.(which is not wanted).
How do I add SQL to the LOOKUP such that... the user can ONLY choose to enter text that EXACTLY matches an Already existing entry in the UNIT_NAME field?
I tried to enter a validation rule: [ATTACKER_MAIN] In ([UNIT_TABLE.UNIT_NAME])
I get an error that the field 'UNIT_TABLE.UNIT_NAME' does not exist.
Thanks for any help with this validation problem. HKP_MACK
I am building a simplified re-order point system - if inventory position drops below a certain level (the yellow level is this case) one or more purchase order lines has to be created in another table.
I have one table with the following field and data:
ItemId Red Yellow Green Multiple Inventory position 0001 10 30 50 5 45 0002 5 40 47 5 23 0003 11 20 30 10 5
I would like to generate new records (in another table) based on the above fields and three records.Basically the end result should look as the following:
The logic is quite simple - if inventory position is less than the yellow value new order lines should be created in multiple qty (based on the multiple field) until the aggregated value (in table 2) is above the green value.The priotization value should be based on the start inv (in tbl 2) compared to the values in red, yellow and green in tbl 1.
How could I create a single table (matrix) type input view to allocate bank transactions to categories, noting one transaction can be allocated multiple categories with an associated percentage? What approach should I use in Access to get this? So say I have the following tables:
* Transactions * Business Category * Transaction-Business-Allocation (which includes) - Transaction ID - Business Category ID - Percent Allocation
But in terms of the means of reviewing bank account items and allocating I really want a view like this (see attached image)The specific business category could be either selected specifically, or all included.
I Work for an NHS organization. A department here orders prescriptions and sends them out to Gp Surgeries. I have been tasked in designing a database to make this easier for them.
Prescriptions arrive on a Pallet. Each pallet has 100 Boxes of prescriptions on it. Each box Contains 2000 Individual prescriptions. I have a table which contains the following:
Box Number Serial Start Number Serial End Number
When the user enters the first box number and the serial start number, i need it to calculate the serial end number and insert another 99 rows into the table and also calculate the serial start and end numbers for these other 99 records.
We have two facilities that receive four different types of shipments. I wanted to set up a database to track these shipments. Is there a way for me to set up tables such that the person entering the information can leverage the same date and location field for each entry type? For example, we may only receive two types of shipments today and four tomorrow. I want to avoid having the clerk enter the date and location two times today and four times tomorrow for each data entry.
Here's an example of what I mean above:
Date Location Type Qty 5/16 1 A 10 5/16 1 B 1 5/17 1 A 1,000 5/17 1 B 100 5/17 1 C 1 5/17 1 D 11
I'd like for the clerk to select from a fixed number of locations (1 and 2) and a fixed number of types (A, B, C, or D) and provide the date and quantity received.
A while ago I was tasked with creating a compliance testing database for my company's internal processes. For example: Payments, Hiring, Project Management, etc. Right now it's all done through Excel and is structured like this:
In short, a Test has many Items (based on company regulations, like "Has the project been approved by all superiors?"). For each Item you choose a few Samples ("Project A", "Project B" and so on), and for each Sample the user attributes a Grade ("In Compliance", "Not In Compliance", "N/A", etc).
In the Tests mainform, the user fills in the Test details (Tab #1), chooses which available Items he wants to include in his test (Tab #2), details the Samples which will be tested (Tab #3) and finally assigns a Grade to each Item/Sample combination (Tab #4).
Here's what I can't figure out:
In the attached DB, if we go into the "CT - Projects 2013" and check the Samples in Tab#3, we can see they match perfectly with the ones at Tab#4.
Now if we go into "CT - Projects 2014" and do the same thing, we can see that the Samples assigned to the Items in Tab#4 don't match up with the ones in Tab#3 at all. This is because the DB is checking only if the Samples' ItemIDs match with the ItemIDs in the test. But it also needs to make sure that the TestID, the Item's TestID *and* the Sample's TestID match, or it just won't work!
I attached a 2003 version of the database as the first upload used Access 2010.
I am trying to customize one of my query table, so that it shows the latest review date of an employee (with multiple entries). I have gotten the SQL statement to work so that it shows the latest employee review date which is greater than the current date. But if the employee has 2 records after the current date and I want it to show the latest entry of the 2. I don't know to put add a sub-Select statement or whether to add another criteria in the Where criteria.
e.g. Current Date = May 25, 2005If Employee A's next review date is set for June 1, 2005 but has already been reviewed (the next review date is May 31, 2006). The query will show the June 1, 2005 and not the latest entry of May 31, 2006.
Because there are 2 review dates that are after the current date. What should I do to make only the latest entry appear?
Below is the my VBA code so far, which produces the above result.
SELECT tblEmp.fname, tblEmp.lname, tblEmpWorkHistory.[current store], tblEmp.position, tblEmpSalaryHistory.salary, tblEmpSalaryHistory.next_review_date FROM (tblEmp INNER JOIN tblEmpSalaryHistory ON tblEmp.ssn=tblEmpSalaryHistory.ssn) LEFT JOIN tblEmpWorkHistory ON tblEmp.ssn=tblEmpWorkHistory.ssn WHERE (((tblEmpSalaryHistory.next_review_date)>Now() And (tblEmpSalaryHistory.next_review_date)<=[Please enter the Next Review Date])) ORDER BY tblEmpSalaryHistory.next_review_date;
My brain is stuck and can't figure it out. I hope any fresh mind could help me out. Thanks in advance.
im in the middle of developing a database to log DOWNTIME of various machines in the factory. Basically myself and others will use it to log breakdown details and the amount of time (in HH:MM) the machine was off.
I have a form which will list details of a certain machine in a list box which i can populate using a query.
The list box will display 3 columns: Date of Breakdown, Machine Name and Downtime
I then have a text box below this that i would like to display the TOTAL amount of downtime for that machine (The listbox may have different information in it depending on the query criteria, e.g. It might display a certain month for a certain machine).
THE ISSUE i am having is its proving to be difficult to get the correct sum of the accumulative time to display correctly in the text box.
Is there a way i can use a query to calculate the total time of a column and return a value which is formatted as time (like this hhhh:mm or dd:hh:mm) or preferably use some VBA code on the form itself to total up the DOWNTIME column of the list box and display it with the correct format in the text
I have gotten close, but as the total amount of time exceeded 24 hours, it went past 00:00. I'm assuming it treated it as a clock and went into the next day? This is NOT what i am after, i need the total amount of days, hours spent on the machine and not a time of the day.
Right now i have a qry that takes ID - Name - Order - RepeatOrder - Month - Department.
Now when i run the qry what i want is a grand total of Order/Repeat Order by Name for the Month, what is happening is the qry is creating multiple entries for different departments. I even have Department "Group by" but still causing the issue, For example:
For APR:
4/1/14 Dep A 12 2 4/1/14 Dep B 10 2
However i do not want them separated, how to i merge the data into 1 entry? 4/1/14 22 4?
Hi guys. I'm a bit of a noob with Access. I have a table which is 15 rows by 250,000 columns. So there are about 3.75m records.
What I need to do is to get access to export a number of csv files automatically from this table.
I need each csv file to contain all the data in the table for a certain range of rows. This is determined by a value in a particular column. This is a sample of the table.
http://i30.tinypic.com/aljf5s.jpg
Basically Store_Nbr represents a UID for a particular store. All the data is currently in one big table, and I need a single csv file for each different store_nbr (so it contains all the data in the table for each unique store). Also, for each store_nbr, there are different Year Month of Surveys. For each store_nbr, I need a different csv file for each Year Month of Survey. This will probably divide up the 250,000 long table into about 200 csv files, as there are about 50 different Store_nbrs, and there are 4 surveys for each individual store.
Sorry if I've not made myself perfectly clear.
I'm sure there's a simple way of doing it, but I really do suck with access and was wondering if you guys had any idea.
Here is my problem: I have an Access database that contains a table with three columns (A & B & C). Field A is for code values and field B is for the value for that particular code. Field C holds the case number. I have a folder that contains the information for over 5000 case numbers. Each case number needs to be placed inside of the table. Considering there are 5000 case numbers, I dont want to use the import wizard 5000 times.
Furthermore, the text file only has two columns (for A and B).
I am trying to create a VBA that will append rows to the table by going into each file and placing the information into the table. The first row for each file contains the case number. So when the VBA runs, it should open the text file get the case number from the first row (field B on the text file) and place that in the case number field of the table for the entire file; and then repeat this action for all of the files in the entire folder.
Any help that can be provided will be greatly appreciated.
I am having trouble creating a query where I am trying to count number of records for different fields for a particular criteria, and combine the results into a single table.
My table is in the form, TimeandDate,WS127m_Avg,WS82m_Avg....
I want to count those records where a 9999 is reported, and report by month. For a single field I can do this OK using,
SELECT DateSerial(Year([TimeandDate]),Month([TimeandDate]),1) AS [Month], Count(WS127m_Avg) AS 9999s FROM CL_AllData WHERE (((WS127m_Avg)=9999)) GROUP BY DateSerial(Year([TimeandDate]),Month([TimeandDate]),1);
I can't figure out how to report an additional field (WS82m_Avg) at the same time, checking for the same criteria in that field (i.e. WS82m_Avg = 9999).
I have some data in excel which I am importing it into MS Access 2002. Each excel file (one worksheet per file) is imported into separate tables.
I want to combine all my imported tables into one table. Is that possible, if yes then how and if no then what can be done to get single table after impoting data from various excel files.
I am coding in VBA and use Microsoft Access as the front end. My question is : I have a table(tblStudent) which has two fields Student Name and Gender.
I want to add multiple records in this table through a form at a button click....(Say I want to add least 5 students at a time) So, I have 5 textboxes for student name, 5 textboxes for Gender and an Add button. How do I so this programmatically?