Selecting From Table In Form Creating New Entries As Opposed To Using Existing

Sep 18, 2012

I have setup a simple access database consisting of 3 tables

Volunteer
Id (PK)
Name

Job
Id (PK)
JobName

Link
Id (PK)
VolunteerId (FK)
JobId (FK)

There is a one to many relationship between Volunteer and Link and a many to one between Link and Job

I want to create a form from which I'll select a Volunteer Name and then choose a JobName from a list box of options and have it create an entry in link with the id of the volunteer selected and the id of the job selected

So let's say there are 5 entries currently in the Job Table.. let's call the JobNames A,B,C,D and E.

In my form I select my name from the list (sourced from volunteer.Name) and then select B from the dropdown. My desired result would be a single entry gets created in Link with VolunteerId = 1 (representing me) and JobId = 2 representing the selection of B. Problem that I am having is that after I select B in the dropdown it creates a new record for B in Job and the Link table gets updated with that JobId as opposed to simply using the one that was already in the table.

View Replies


ADVERTISEMENT

Selecting Existing Table Name Using Form's Combobox For A Query

Dec 12, 2006

Folks,
can someone help me on this? I am not sure why the select query inside this procedure is not working. Here is the that routine:

Public Sub temp()
Dim strDocName As String
Dim strTableName As String
Dim strTbl As String
Dim aot As Access.AccessObject
Dim strSQL As String
Dim rpt As Report
Set rpt = CreateReport

strTbl = Forms!frmSearchBoilerGuar!cboTypeOfGuar

For Each aot In CurrentData.AllTables
If aot.Name = "strTbl" Then
strTableName = strTbl
End If

Next aot

strSQL = "SELECT tblProjts1.chrProjectName, tblProjts1.chrBlrPropNum, " & _
"strTablename.memGuranItem , strTableName.memLDs FROM tblProjts1 " & _
"FROM tblProjts1 LEFT JOIN strTableName ON" & _
"tblProjts1.intProjectId = strTableName.intProjectId"

rpt.RecordSource = strSQL
strDocName = "rpt"

DoCmd.OpenReport strDocName, acPreview
End Sub


Basically, I am trying to select a table name from the combobox and then use that table name for my query. Then I want to use that query as a recordsource for my report.

Any help is greatly apprecited.

Shan.

View 2 Replies View Related

Tables :: Creating Table Within Existing Database Using SQL Commands

Apr 8, 2015

I was asked to create a table within an existing database using these SQL commands;

CREATE TABLE Vehicle (reg_no TEXT(10)
CONSTRAINT VehicleKey PRIMARY KEY,
type TEXT(10),
purchase_date DATETIME,
last_service_date DATETIME, mileage_at_last_service INTEGER);

I was told to save the query and check the new table had the required records in it.

I had huge problems when I tried to save the query and kept getting error messages like: "query must have at least one destination field" and "syntax error in field destination". This was strange since I was sure I typed the query exactly as it had been written on the worksheet.

Having not changed the SQL command at all it eventually worked when I skipped the 'save query" stage and just went to the "run query" stage. I still don't know why it actually worked in the end and why I kept getting error messages.By running the query am I supposed to just click on "RUN" or can I check the information first by looking at datasheet view?

View 6 Replies View Related

General :: Creating Entries In A Table Based On Multivalue Lookup

Aug 3, 2014

I am designing a database for a quarry for maintenance of their machines. I have a table that has a full list of all the parts on the machines, and a multiple value lookup field that says what machines said parts are used on. I am trying to have these values translate to another table, so I can then insert a field to say how many of each part are used on the respective machine, to display on an information form for each machine.

I would also like this table to update if the relevant information is updated, for example if a new machine is input, then have the table update to reflect what parts are used on it (an After Update function?) I have made a query that gives me the read out I want (attached) but just cannot figure out how to get that into a table so I can add the extra information.

View 1 Replies View Related

Creating Two Tables - Old Entries And Weekly New Entries?

Mar 13, 2014

I have a table in access which is updated weekly; I need to create two tables from this updated table.

1st table will consist of all the new entries for the current week

2nd table will consist of all the entries from the previous week - an amalgamation of all the entries which are not from the "current week" (table) For example; the table below shows the two entries from last week.

ID
Name

1
Adam

2
Ben

This week I have three new entries New entries

ID
Name

3
Charles

4
Richard

So when I run the same query next week I will get something like this.

Old Entries
ID
Name

1
Adam

2
Ben

3
Charles

4
Richard

[code]....

How do I get a query /queries which divides up the weeks new entries and also all the old entries.

View 11 Replies View Related

Creating Combobox With Unique Month And Year Entries From A Date Field In A Table

Jul 18, 2005

Hi,

Anyone know how to create a combo box that has unique month and year entries from a table (month in one column and year in another - i.e. 2 columns)?

I've been able to get the textbox of the combobox to output the correct format using a custom format but it does not affect the combobox data. Also, I'm not sure how to separate this by two columns...

Any help would be much appreciated!

View 2 Replies View Related

Forms :: Creating A Form Which Copy Selective Entries From Previous Record

Dec 10, 2013

I am tasked with creating a scientific database of fish catches at various different sampling stations. I envisage the entry form having hierarchy levels, ie year, season, date, sample station, species caught, and then the specific associated data with each species (weight, abundance, length etc) will form each distinct record.

In each year there are 2 sampling seasons. In each sampling season there are up to 20 dates on which samples are taken. On each date there are up to 50 sample stations recorded. And at each station up to 20 species can be recorded.

In order to enter each species caught in a survey, the end user will potentially have to fill the season box with an entry 40,000 times. For each season there will be 20,000 date entries to be made. For each date, 1,000 station code entries, and 20 species entries for each station. What I would like to happen is this.

When the end user is entering the data, he or she will be working through the hierarchy from the ground up. Ie., they will enter a particular species' data (abundance, weight, length etc) at a particular station on a particular date during a particular sampling season. The next entry will be a different species at the same station on the same date during the same season. I would like the duplicated information from the previous record to be copied across onto the new one so that all the end user has to do is enter the species name, abundance weight and length data.

Once they have finished entering all the species data for that particular site, they can move onto the next site which they would fill in the data themselves for the station code. So, in the hierarchy, the first button would copy all the previous data except the species name and associated weight length abundance data. The next button would do the same, except leave the station code blank. The next button would leave the species name, station code and date blank. And so on up the hierarchy. The end user would be able to selectively choose which data is copied over by using these buttons, saving lots of potential extra work doing repetitive entries.

View 1 Replies View Related

Selecting Entries In Combo Box That Aren't There

Jul 14, 2006

I seem to remember that there is a way, in a combo box, of entering an entry that isn't displayed in the combo box, so that you can then process that entry into a form's underlying table?

I think the example of doing this was in the MS Samples database for either Access 97 or Access 2000.

Does anyone recall what I'm talking about? Second question, does anyone have a link to those sample databases? Our technicians didn't bother loading the samples for us, so I'm kinda stuck.

Thank you tremendously to any and all who reply..... I'm looking forward to your responses!

View 4 Replies View Related

Creating A New Record From Existing Information

Mar 28, 2006

Hi there,

I have a form with information on it relating to several linked tables. I would like this information to be duplicated in the tables and a new autonumber assigned.

Is there a way that I can do this by clicking one button and the autonumber will automatically generate a new number keeping the rest of the information in the form and updating the tables with a new record?.

Thanks for you help
Belinda

View 2 Replies View Related

Creating Fields From Existing Data

Aug 10, 2006

I am not sure that I am in the Correct Section for this question but I am sure I can be forgiven for that :

I am attempting to build a db for a friend who has all his data in one table. During normalisation I have seperated the various threads of data into various tables of usable information. My problem is that I need to seperate his clients fullname into First & Surname i.e. Fullname: Mick Burke to FirstName: Mick and Surname: Burke - in other words make two fields from one.

Any help in doing this would be well appreciated.

View 2 Replies View Related

Tables :: Creating Er Diagram From Existing Database?

Aug 21, 2013

Using access 2010; anyway to create an er diagram from an existing database? I have inherited a fairly large database and need to make changes to some field properties and need to find out where these fields are located. I know I can go into tools and run the documenter but doesn't give me an easy format to look at.

View 5 Replies View Related

Forms :: Linking Existing Form To New Table

May 1, 2015

Each month I receive a new excel spreadsheet (alpha Roster), Last month I created a form so that I can track certain things off of the Table (spreadsheet), I just received the new Spreadsheet for this month and was wondering if I can use the existing form and how hard it is to link it to the new spreadsheet? Is that even possible? I don't want to have to re create the form every month, I would like to just bring the new alpha roster in and be ready to work.

View 4 Replies View Related

Creating Budgets From Already Exisiting Entries?

Feb 12, 2006

Hi all,

I'm working on a database for my school that is designed to keep a record of each staff members activities that they go through during the year. With the activity information, all their expenses for that activity are listed (see database for more information). Anyway, for anyone who has the time to look at it, here is what I am having trouble putting together:

I have done everything except create budgets. I would like to be able to set a yearly budget for each department (Maths, Science etc.), with the ability to create a mini school budget (Junior School, Senior School etc.) from the sub department budgets. Laid out like this:

Budgets:
- Junior School
- Middle School
- Senior School $8050 (worked out from the total of the department budgets below)
-- Maths $2000
-- Science $3000
-- English $3050

What I would like to be able to do is get the Total Expense for each activity that each staff member has undertaken, and subtract that from that staff members working department (shown in database). I would then like to be able to create a report, showing:

Departments Budget
How much the department has spent
How much they have left in their budget

You can then use the figures for each department to get these values for an overall Senior School budget:

Mini Schools Budget
How much the Mini School has spent
How much they have left in their budget

Does anyone have any ideas as to how I could tackle this?

The database is available for download here:

http://seconddimension.com.au/Database/StaffProLearning.zip

(Hold down Shift when opening the database to access design mode)

I'll look forward to hearing from people soon.

sugar05

View 1 Replies View Related

Adding New Field To Existing Table And Form - Getting Error

Jun 8, 2014

I'm trying to add a combo box field to an existing table and form. I added the new field to my existing table and set it up as an combo box added my row sources. Then added the new field to an existing form and now am getting a error stating "The record source "Table name and added field here" specified on this form or report does not exist. When I just make the new field a text box instead of combo box it works just fine.

View 2 Replies View Related

Updating Form Entries To Another Table

Jun 11, 2006

Hi all

I'd be very thankful if someone can please help me with this problem.

I have 1 Table. This Table is imported and contains data from Excel. It also contains fields I added manually. There is about 20 imported fields (full of data) and about 100 manually added fields.

Then I made a Query of this table. I made some calculations in this Query.

I then created a Form based on the Query. I then made a Combo Box. This Combo Box selects a customer, and then updates the other fields (the ones I imported from Excel) depending on the customer I selected.

So now what I want to do is this: I want the fields (updated from the query) and newly entered data to save to another newly-created table. Can someone please help me with this? Any ideas?

Thanks a lot. All input greatly appreciated.

kruger101

View 2 Replies View Related

Creating Auto Fill After Selecting From Combo Box Options

Jul 10, 2013

I just learned about Access 2007 since two days ago. I was assigned to do a database on the competency test records for my company.

I currently have 2 tables: tblCompetencyRecord and tblSections.

In tblSections, I have sectionname and sectionhead. PK is the sectionname.

I created a form from tblCompetencyRecord.

I have employee name, employee number, position, section, section head, test period, status and remarks on my form (like wise in my tblCR).

Now, I want to get Section field (combo box) to auto fill the Section Head field. I've searched high n low (i think), but i just couldn't figure it out.

View 3 Replies View Related

How To Choose The 10 Latests Entries In A Table (from A Form)

Aug 10, 2007

I'll start by saying that I'm not sure which sub-forum to choose, as my question(s) covers several areas, so I have tried with this one first.

I'm currently making a database, which among other things contains a 'Port of Call list' table. I have a form, where I can add data to this table, meaning, that whenever a vessel has left its port, user can update following: Port name, security level, arrival date and departure date.

What I need is two things (it might be more or less the same):

1. When user click a "Generate" button on a form, the 10 latest port calls from the table, should be shown. I'm not sure what kind of control is the best to should the list on the form. Code is also needed.

2. I would also need to be able to print the list. It should be part of a report. Again which controls/which code to be used is needed.

I hope that someone are able to assist, as I have no clue what to do.

Thanks.

View 10 Replies View Related

Show Total Entries From A Table On A Form

May 14, 2006

hi

i am trying to show the total number of records that are in a table.

there are currently 8 entries in the table 'applications'

now i would like to show this on a tabcontrol in a form. I have been told to use Dcount. I have read about this and tried this on my form but unfortunately its not working.

Can anyone show me an example of how i would do this.

View 1 Replies View Related

Table Record Entries Exists But 0 Shown In Form

Jul 23, 2005

Hi,

In the current db there are some tables and queries, forms designed around them

With one table Test
http://members.optusnet.com.au/~lukechang/access/table_d.JPG

That has 3 records in them
http://members.optusnet.com.au/~lukechang/access/table.JPG

Just won't show in form anymore, at this stage
http://members.optusnet.com.au/~lukechang/access/form.JPG

The Form was working previously. This is the second time this problem has came up, I thought it would go away if I made a new form and pasted all the controls and codes. It indeed went away for a while until this problem hit me again...

This db is in Access 2000 format and designed using Access 2003

I would appreciate if anyone is willing to point me to the right directions, many many thanks in advance

View 5 Replies View Related

Login Form - How To Check 2 Data Entries To See If They Are In Table

Sep 28, 2012

I have a login form. 2 spots for users to input and ID and their name. I want to do error checking to see the user inputs a wrong name or wrong id with their corresponding name or ID. For example, I don't want User A to be able to login with User B's name. If User A inputs their ID and inputs User B's name, I want to show an error message stating the their is a mismatch of credentials. Here is my code

Private Sub Command12_Click()
Dim rs As DAO.Recordset
Dim txtID As Variant
txtID = Forms![LoginForm2]![txtEmployeeID]
txtName = Forms![LoginForm2]![Text13]
Set rs = CurrentDb.OpenRecordset("SELECT * FROM CoachTable WHERE EmployeeID = '" & txtID & "'", dbOpenDynaset)

[Code] .....

View 6 Replies View Related

Form Should Only Submit If Number Of Entries In Table Field Is Less Than 3?

May 29, 2014

I have a form (called User_Input)with 2 text boxes, 5 combo boxes and a Submit button, which is bound to a table (called Submssion table) i.e the form submits its entries into the table called Submission.

I want the submit button on the form to work based on this condition:

1. Check current submission of four fields (corresponding to entries from 4 out of the 5 combo boxes on the form) in the table and confirm if the current selection on the form already occurs in the table up to two times. If this is the case, the Message Box should pop up on the form informing user to make another selection as maximum number of entries for that particular selection is already in the Submission table.

2. The checks for the four fields will be done simultaneously as the selection will be done together on the same form.

3. However, if the entries on the Submission table is not up to 2, the entries should be saved to the table and Messagebox should display "Thank you for your Submission"

I need to use Macros for this being a web database which will be published using Sharepoint and VB is incompatible with the web database.

View 3 Replies View Related

Forms :: Adding Table New Entries With Form Retrieving Data

Nov 15, 2014

I have quite an extensive form linked to a table. When I add new columns to the table I seem to have a problem getting the form to read the data.I have just added a numerical column to the table and added a text box on the form that is bound to it. When I try to pull up the value using VBA it is blank, even though an entry is visible on the form. I have set the text box to general number and the entry shows in the actual table. When typing in the entry into VBA it capitalises where required so it must be registering the table entry. However the value it pulls remains blank.

View 2 Replies View Related

Forms :: Inputting Data Into A Form And Getting Multiple Table Entries

Jul 3, 2014

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).

View 14 Replies View Related

Add New Field To Existing Table And Populate New Field With Existing Data

Apr 23, 2014

-Microsoft Access 2010

-Existing Access Database contains tables with 1-2 million records

I would like to add a field[dol] to an existing table[rei]. I need this new field[rei].[dol] to be populated with existing data from another table[main] based on the associated field[main].[account1] or [main].[account2] or [main].[account3].

Table1[main]
...account1
...account2
...account3
...dol

[code]...

In the [main] table. There is always data in [dol]. But there is NOT always data in the [account] fields. Sometimes there is multiple account numbers per [dol] but not always.

Customers will ALWAYS have at least 1 [account] number and [dol]. Some will have multiple [account] numbers and [dol]. Sometimes these [account] numbers are the same in multiple fields[account1] [account2] [account3].I just need to do a lookup or something to find the [account#] and pull in its [dol] from the [main] table and populate it in [rei].[dol].

View 14 Replies View Related

General :: Use Lookup Field As Control In QBF As Opposed To Text Box?

Aug 9, 2013

Is there any way to use a lookup field as the control in a QBF as opposed to a text box?

View 10 Replies View Related

Queries :: Change In SQL All Columns To Sum Rather Than Group Opposed To Dropdown

Oct 24, 2014

I have 30+ columns each table I need to change into sum of.. but its default is group by, and need to change multiple columns to sum - rather than manually each one..

View 1 Replies View Related







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