Forms :: Entering Data Into Related Tables Using A Form
Sep 12, 2013
I have a form within my database in which the user will enter data which will go into 2 separate tables. These 2 tables (Job and Client) are related. At the moment I have a subform in which the user enters Job information, and the main form where the user will enter client information.
The problem being is that the 2 sets of data do not associate themselves with each other, despite being related (The Client will be related to a job number. A client can have many jobs but a job can only have one client etc). It has to be done manually in the table which is not ideal as the DB will be split and rolled out to users via Access Runtime. I have been working on this DB for a while now and the problem is most likely right in front of me but I cannot see it!
View Replies
ADVERTISEMENT
Mar 3, 2014
I have a database I made to store a list of users and information about each user.
I have a UserDetail table, languages table, previous experience table, current experience table.
UserDetail table as follows:
UserID (PK)
First Name
Last Name
Full Name (calculated)
Department (using a multi select combo box. There are 3 departments and some people are in both).
I need to do the same thing on each table and each table is very similar so I'll just list one. This is the Previous Experience table:
PreviousXPID (PK)
Previous experience (e.g. IT, Marketing, Chemistry)
I have three junction tables. One for each Previous Experience, current experience and language table. The Previous experience junction table has:
ID (PK)
UserID
PreviousXPID
I created a relationship between the userdetail table and the junction table then the junction table to the Previous Experience table.
Now what I'd like to be able to do is edit people to add previous experience, current experience and languages to each. I already have a form that lets me add a new user to the database. It's just based on the UserDetails table. If I could have a way (perhaps using 3 multi select list boxes. One box for previous experience, one for current experience and one for languages) on that form to add the other details to that person, that would be ideal. I'd like to create a new user. E.g. Joe Bloggs in department 1 who speaks Dutch, used to have Marketing, Chemistry and aeronautical experience and now works in IT.
I can create the new user by putting last first/last name and selecting the department. But to add experience or languages, I have to go into that junction table and add the numbers myself. e.g. user 1, has experience 1,3,4 and 5. I'd like to see the name that relates to the ID and be able to select it from the list in the table I have.
View 11 Replies
View Related
Apr 21, 2006
Is it possible in Access to create one input form that includes fields from different tables.
I want to create a single form that dispenses input fields to separate tables, I don't see anything to make this happen. I know you can retrieve data from separate tables utilizing querys. But is it possible to input data into a single form to multiple tables ?
View 2 Replies
View Related
Jul 19, 2006
Hello,
My first post is on something that is troubling me. I have a Form acting as the display and entry point for data for a contact list, which is composed of two Tables as follows:
Contact - (text fields including: first name, last name, phone number home, phone number work, etc)
Industry Role - (yes/no tick boxes including: film, photographer, audio engineer, producer, reporter, etc)
The two Tables have a one to one relationship based on the URN field which is an autonumber. My problem is that when someone enters say a name, and then ticks a box, the autonumber will add two entries because it seems to see the first table then the second tables as sequential, and not the same thing. How do i go about making a form that can enter new records the same autonumber for two connected Tables?
View 3 Replies
View Related
Jul 24, 2006
I need help. I am not sure if this is a form issue or a logic issue i have a db for tracking students the classes they take and their notetakers for classes. Each class is most likely unique to each student but sometime there are multiple students in each class that need a notetaker and there should only be one notetaker per class. I have 3 tables and they are all linked through a unique iD called CRN (number).
I am looking for a way to add a student to a class and create a class at the same time in one form. I am trying to limit the redunancy by adding a class each time and then adding a student to the class.
Any suggestions would be great. I have gone through 10+ redesign and am just at a loss on how to accomplish this.
View 1 Replies
View Related
Mar 13, 2013
I would like to be able to change font color and appearance while entering data into a form (example: italicize a word). Is there any way to activate the font format while in a form?
View 2 Replies
View Related
Aug 19, 2013
I have a form based on a table which includes the mid field. I want to have a macro that takes the value of the current mid, and makes a new record in a 1-many related table (consisting of record id (auto), mid and trmntdate), paste the mid and insert the current date.For the life of me I cannot get it to work? The process should be something like:copy mid value, add new record to related table, paste value in mid, insert current date in trmntdate, save. I've tried append queries, experimented with copy etc, dabbled blindly with VBA and not got anywhere.
View 14 Replies
View Related
Dec 12, 2012
I'm using Microsoft Access 2007
I have three tables: the 1st is for product's identification, the 2nd is for registered products, and the 3rd is for under-registration products
and the primary key for the three tables is the Registration Number
and there is a one to one relationship between the product identification and the registered products
and a one to one relationship between the product identification and the under registration products
What I want to do is to make an append query to move the under registration product to the registered product when its process is over.
One of my problems is with the primary key for the under registration products table, as they only get their registration number when the process is over. so how can I enter data into this table without the value of the primary key ?
View 14 Replies
View Related
Apr 3, 2007
I have a form displaying the 11 fields of the parent/primary table using a selection from a combo box. I am using queries and vba code modules respective to form, combo box and command buttons. I have initial code that uses the two fields from the combo box selection to append same to a new parent/primary archive table. I now want to add to the append SQL the remaining fields to the parent/primary archive table. When I add the second sql string for the remaining fields to the same procedure and execute I keep getting 'null in primary key'. If I copy the primary record and paste same into the archive table it works.
Private Sub Command26_Click()
On Error GoTo Err_Archive_Primary_Click
Dim strSQL As String
Dim strSQL2 As String
strSQL = "INSERT INTO ARC_289325045 ([Survey Point ID], [Survey Area Detail], [Date On Site]) " & _
"VALUES ('" & Me.cboAreaDetailDate.Column(0) & "','" & Me.cboAreaDetailDate.Column(1) & "'," & _
"#" & Me.cboAreaDetailDate.Column(2) & "#)"
CurrentDb.Execute strSQL, dbFailOnError
'strSQL2 = "INSERT INTO ARC_289325045 (RecordID, UnitID, UserName, [TimeStamp], [Survey Point - Area], Measurement, NewArea, [EXIT Form] ) " & _
'"SELECT FORM_ID_289325045.RecordID, FORM_ID_289325045.UnitID, FORM_ID_289325045.UserName, FORM_ID_289325045.TimeStamp, FORM_ID_289325045.[Survey Point - Area], FORM_ID_289325045.Measurement, FORM_ID_289325045.NewArea, FORM_ID_289325045.[EXIT Form] " & _
'"FROM FORM_ID_289325045"
'CurrentDb.Execute strSQL2, dbFailOnError
Exit_Archive_Primary_Click:
Exit Sub
Err_Archive_Primary_Click:
MsgBox Err.Description
Resume Exit_Archive_Primary_Click
End Sub
The next step is to do the same for the child table and append related records to the child archive table.
View 4 Replies
View Related
Apr 3, 2007
I have a form displaying the 11 fields of the parent/primary table using a selection from a combo box. I am using queries and vba code modules respective to form, combo box and command buttons. I have initial code that uses the two fields from the combo box selection to append same to a new parent/primary archive table. I now want to add to the append SQL the remaining fields to the parent/primary archive table. When I add the second sql string for the remaining fields to the same procedure and execute I keep getting 'null in primary key'. If I copy the primary record and paste same into the archive table it works.
Private Sub Command26_Click()
On Error GoTo Err_Archive_Primary_Click
Dim strSQL As String
Dim strSQL2 As String
strSQL = "INSERT INTO ARC_289325045 ([Survey Point ID], [Survey Area Detail], [Date On Site]) " & _
"VALUES ('" & Me.cboAreaDetailDate.Column(0) & "','" & Me.cboAreaDetailDate.Column(1) & "'," & _
"#" & Me.cboAreaDetailDate.Column(2) & "#)"
CurrentDb.Execute strSQL, dbFailOnError
'strSQL2 = "INSERT INTO ARC_289325045 (RecordID, UnitID, UserName, [TimeStamp], [Survey Point - Area], Measurement, NewArea, [EXIT Form] ) " & _
'"SELECT FORM_ID_289325045.RecordID, FORM_ID_289325045.UnitID, FORM_ID_289325045.UserName, FORM_ID_289325045.TimeStamp, FORM_ID_289325045.[Survey Point - Area], FORM_ID_289325045.Measurement, FORM_ID_289325045.NewArea, FORM_ID_289325045.[EXIT Form] " & _
'"FROM FORM_ID_289325045"
'CurrentDb.Execute strSQL2, dbFailOnError
Exit_Archive_Primary_Click:
Exit Sub
Err_Archive_Primary_Click:
MsgBox Err.Description
Resume Exit_Archive_Primary_Click
End Sub
The next step is to do the same for the child table and append related records to the child archive table.
Edit/Delete Message Reply With Quote Quick reply to this message
JJKramer
View Public Profile
Send a private message to JJKramer
Find all posts by JJKramer
Add JJKramer to Your Buddy List
Sponsored Links
View 1 Replies
View Related
Feb 26, 2013
I've just come accross a problem where pasted data dissapears from view. It's caused by people being a bit careless and copying the line above (from word or notepad for example), which adds a return and then the data drops out of view.I really want to create a validation rule to make it impossible for returns to be pasted but I'm not sure how.
View 2 Replies
View Related
Oct 22, 2014
I have to make a Costing System but for that I need to enter our Expense details in database according to Fiscal year and months.
I need a table for Fixed expenses and one for Variable Expenses and then I need one or more Forms to update data in those tables. Now I've created a table with Fixed Expenses. I have to update Year and Amount in that. Now it is only letting me one entry per Expense.
I want multiple entries for one Expense say 'Advertising' for different years. I'm thinking may be I need to make more than one Table, may be one for Expenses with ExpenseID and other for Years with Year and YearID and the third one for Amount with columns Amount, Method of Payment, Date and Notes. I did tried this but I think I'm not creating proper relation may be because its only updating for one year.
I'm using Access 2003.
View 2 Replies
View Related
Sep 27, 2012
I have a built a database to record and collate info about clinical trials that are run within my department. I have one large table [Trial Info] which contains all trial info and have created a second and third table [Milestones] & [Comments] to collect dates of various milestones and a notes that occur throughout the course of a study.
The milestones (dates) are recorded in the 2nd table and the comments are recorded in the 3rd table.
All data is entered by staff on forms. The first form captures basic info about the study, once this has been entered, the idea is to click a button to open the second form to document the trial milestones, this form also contains a subform for listing any free text comments required during the life of the study which are stored in the 3rd table.
I have setup the relationships between tables as best I can.
The main table with basic trial info is the parent table, linking the primary key to the foreign key in the second table, the foreign key of the third table is related to the primary key in the second table so these tables should be looking up the correct clinical trial as far as I can tell.
The form containing data from the main table has a button which I have set to open the Milestones & Comments form, and I have set this to open to the record that relates to the record in view in the primary form. The primary key is related to the foreign look-up key in the milestones table.
This opens the form fine, however this is not updating the foreign look-up key, this remains '0' which I assume is the cause of the following error when I try to save changes to the record
Quote:
You cannot add or change a record because a related record is require in table 'Trial Info'
How do I trigger the foreign key to update to the primary key so that the first time a milestone page is opened for a new study it creates a matching record?
View 4 Replies
View Related
Dec 11, 2004
I want to insert a huge number of data (Customer and their adress) into 2 related tables in Access. Each table in access is related by some kind of ID (Autonumber-Primary key). The first table is CUSTOMER , the other one is CUSTOMER_ADRESS . Access relate each Customer to his Adress, so if I import data into one table and then import data into another table how would the database know that all the data pertains to the same person. How to insert the new list of customer and adress without using a form?
Thanks for your help.
View 6 Replies
View Related
Aug 29, 2014
I have made my first form and I did not to bad (?). I am thinking there is a faster way to enter data into my drop down box. I have set the tabs in the order I like but I have to tab to the next dropbox, then double click to open the box, then double click on my choice then double click on the next one. Is there a quicker way to go through 25 dropboxs?
View 6 Replies
View Related
Dec 1, 2013
I have made a table and I enter data in that table through a form. The form also include two sybchronized comboboxes. When I select a category in one combo box, corresponding items are selected in second combo box. The problem is that when I select the category in the form (with ID+Category Name), it stores only the ID in the table. How can I see the Category Name in the table (which is the control source of the form) instead of ID?
View 4 Replies
View Related
Jan 16, 2015
I know some basic code to disable a control after updating but, I have 20 or so controls that I want that to happen to as the record is updated over time. Is there a way to group all those controls and have them evaluated after going dirty instead of having to code each control?
View 4 Replies
View Related
Jan 24, 2005
I have a form with a sub-form
eg
Purchase Order with main details on (Po Number, Supplier etc)
with a sub form carrying the line items to be ordered.
Table PO
Form PO
Table POSUB
Form POSUB
When entering main order details into Form PO, why do the fields in the related table(Table PO) immediately get populated when the the focus gets transfered to the sub-form (Form POSUB). with users quiting the database illegally (not by the cancel records button) the result is unwanted records in the Table PO.
What I want to do is complete the input fields in the main and sub forms without any records being commited to the tables until the "Save Record" button is pressed.
Thankyou
View 2 Replies
View Related
Jul 4, 2005
I've been working on a database (attached) for a health trust. I think the relationships are right but I'm having a problem entering data. The subform shows the correct data but I can't figure out how to enter data using a form.
Can someone point me to a tutorial - I have searched the forums - honest!!
View 8 Replies
View Related
Apr 28, 2014
I have 2 related tables by ID field.
In a subform I have all fields of a one table, when I make click in a button, open other form with info related by these ID.
All is ok but I have some doubts:
If in the second form (second table) there is no registers, how could shows me the ID by default and that the ID field is not empty
If I create a new register inside second form with a button, I would like that the ID field was always filled because the user don't need to know the ID.
View 2 Replies
View Related
Aug 7, 2014
I'm trying to create a system where if I enter data into one field it will automatically appear in the corresponding field in another table. For instance if I enter the values 10,12,15 into a field called QID in table A I would like this to appear automatically in a field called QID in table B. Both tables are related and I have enforced referential integrity and 'cascade' options but this still doesn't seem to allow one table to automatically update another. My ultimate aim would be to have a form that you filled in data for the field QID once that then propagated to both Table A and Table B.
View 2 Replies
View Related
Aug 8, 2006
I've designed a form to enter several items at the same time, eg, I want to enter aeveral company names on one form. The trouble is that when I enter data into one box, it appears in all the other boxes with the same field names, not allowing multiple data, is there a way around this?
View 2 Replies
View Related
Jan 23, 2006
I have a form with two fields, EMPLNO and SURNAME.
By entering the employee number in EMPLNO or by entering the name in SURNAME I wish to get the correct record onto the form.
This is probably covered in the archive, but I'm not sure what to look for.
Any suggestions.
View 1 Replies
View Related
Feb 25, 2015
I have a form into which I scan a serial number in one of its text boxes, I can then select search and am presented with a report relating to that serial number. All simple so far. Now for the dilemma... The barcode I scan consists of 15 characters like so, 53423PP98765432, numbers-PP-numbers.. the problem I have is that I only need the numbers after the PP's, in other words the last 8 digits. My question is, is there something I could do to make the text box omit the first 7 characters automatically, leaving me with the 8 I need, instead of me having to curser into the middle and manually delete the first 7 characters. I only need the last 8 because of the link with another database that only uses the last 8 digits.
Also, on the device I scan, there are 2 other barcodes, above and below the one I need to scan. If I scan one of the others by mistake, I have to highlight and delete the results to try and scan the middle barcode. The other barcodes also have a different length to the one I need. So is it possible to write some code that says, ok, you have scanned a barcode with 10 or 12 digits, we don't want either of those, so deletes it for me to try again, but then recognizes the 15 digit barcode and auto deletes the first 7 characters as mentioned above.
View 7 Replies
View Related
Mar 21, 2007
I apologies for this sinmple quesiotn to some of oyu, but being fairly new with Access, Im having problems when I update my form and then print our a querie, to obtain certain information, the new data is missing.
HOw can I make sure that my querie gets updated when I update my form.
Thanks you
View 6 Replies
View Related
May 24, 2005
I apologize if this has probably been asked countless times; however, in my search of this forum I could not find something that seemed to work for something so simple.
**************************************************
Scenerio:
I have 2 forms. The first form is my main form and the second form is my "popup" form. Both of these forms access the same table. In my main form I have it so people can not enter in a ID so it reduces accidental data entry. Therefore, I created a "popup" box that allows ID entry.
Everything works great except when I close out of the popup form, the newly entered data is not available unless I close the main form and reopen.
Million Dollar Question:
How do I refresh or requery (dunno the correct term usage here) the main form to reflect the addition I made in my popup form. I would like the refresh event to happen when I click the close button on my popup form.
**************************************************
Again, I know this is probably simple, but I cannot find it anywhere or most likely I am blind :cool:
Thank You
View 1 Replies
View Related