Create Records From A Form

Nov 18, 2004

Can someone direct me as to the most efficient way to add records to a table from a form? I have a table of members and a table of invoices and want to automatically create an invoice for each member by clicking a button on a form. Is there a way to do this using a macro, query, or do I write it in VBA?

Thanks much!

View Replies


ADVERTISEMENT

Forms :: Based On User Selection In A Form / Create New Records For Subsequent Form

Feb 3, 2014

The user will be creating a new project that contains a bunch of releases. The releases have standard names which are stored in a table tbl_ReleaseNames It should be noted that the list of names is not static.

The user selects which of the releases pertains to their project and then based on their selections, new records would be created in tbl_RFP_Release and then a subsequent form would open where it would display each of these newly created releases where they could enter additional information. I thought of creating an unbound checkbox associated with each of the standard names, and then checking to see if the checkbox was checked and then creating the new records followed by opening up the new form.

View 6 Replies View Related

How Create Form That Allows You To Edit But Not Add New Records.

Mar 30, 2006

I guess this is a fairly basic one. I have a form that allows people to edit records, but I want to prevent people from adding new records on this form. I thought that if I put 'no' in the 'Allow additions' property, I would achieve this end, but when I do this, all the input boxes dissappear.
appreciate help
thanks

View 2 Replies View Related

Forms :: Create Multiple Records On One Form?

Mar 19, 2014

I've developing a QA/QC database for testing chemical products and I'm stuck on the best way to continue with adding multiple records by using one form.

I have two tables:

tblProductSpecs with two primary keys, "ProductName" and "TestName"

tblResults with three primary keys, "ProductName", "TestName", and "LotNumber" and a number field named "Value"

A product can have multiple tests associated with it, e.g:

ProductName - TestName
XXX - Density, pH
ZZZ - Density
YYY - % soluble, cloud point , freeze point
This is my tblProductSpecs table

I want to store the "Value" of each "TestName" of the "LotNumber" of that "ProductName" in tblResults by a form. (All TestName values are number values).

I want a form where I can select "ProductName" and have the "TestName"s displayed for that "ProductName". Then I want to store the value of that "TestName" for that "ProductName" and "LotNumber" in tblResults.

The problem is that each test per product per lot number is a record and I can't figure out a way to create multiple records from one form.

View 14 Replies View Related

Pulling A Value From A Form To Create New Records In Append Query

Feb 27, 2006

So, I've been searching through this forum and can't seem to find the answer to this one. I would like to capture a value from a main form and have it used as a value in an append query, in order to populate a subform based on the main form, like so:

INSERT INTO tblTakenSurveys ( VisitID, SurveyQuestionID, ResponseCodeID) SELECT Forms![frmMyFormName]!VisitID, tblSurveyQuestions.SurveyQuestionID, 66
FROM SurveyQuestions WHERE SurveyID = 3;

Might help to explain some of the terms in this statement:
tblTakenSurveys is where I need the new data to be entered via the subform.
Forms![frmMyFormName]!VisitID is a textbox control bound to a PK in another table that has a one-to-many relationship with tblTakenSurveys.
tblTakenSurveys.ResponseCodeID is a foreign key that represents respondents actual answers to questions.
66 is a value for a ResponseCodeID that stands for a dummy value meaning "data not yet entered"


As per advice I received from others on this forum, I have set a query like the above to run from a command button to populate the subform (in theory). But I'm sure I've done something wrong within the query because it will not return a value from the form "VisitID" control and therefore will not append the rows. Without the appended rows, my subform will not populate. And this has me running in circles...

I pasted the link to another thread below, where I originally received a lot of input as far as the table structure. I did not start this one, but my posts are the most recent (as of now anyway). Pat Hartman had given me a lot of the guidance here.

http://www.access-programmers.co.uk/forums/showthread.php?t=100176

View 1 Replies View Related

Forms :: Create Report From Only Records On Current Form

Oct 23, 2013

I have a continuous form based on a 'start date' - 'end date' query. I would like to be able to select certain records from this form to print.

I have added a 'print' field and have created a new query including this parameter which a report can be based on but when i run this report I am, of course, asked for the original 'start date' and 'end date' again.

Is there any way of linking the command button to only the records on the current form?

View 1 Replies View Related

Reports :: Create Message When No Records Found From A Form To Query

Jul 28, 2014

How to create a message when no records are found from a form to a query in the report.

Example; Donations From Great Britain have no records

View 4 Replies View Related

Forms :: Create A Button To Open A Form To Show Specific Records

Mar 4, 2014

I have a main form [Job Quote Form 10-2205] and I am trying to add a command button to open up [Job Process Form-MKD] and have the [Job Process Form-MKD] open up and only show the records that match a certain field, in this case what I call "JobTrackNo" in the [Job Process Form-MKD]. (see attached .jpg)

This problem started to happen only recently, namely you will see that the left column under [Job Quote Form 10-2205] is blank, where normally there had been a number of fields to choose from. The fields are all still available, they are just not opening when I try to match two fields.

View 2 Replies View Related

Queries :: Create Query That Takes Values From Search Form And Provides Records

May 5, 2015

I am trying to create a query that takes values from a search form and provides records. I was having issues with getting results when some boxes on the form were left blank. I found a solution to that and it worked with a small number of fields. However when I make the full form query (about 8-10 fields) and run it says the query is too complex. I wrote the sql as I could not get designer to do what I wanted. Attached is the sql that works and that which is "too complex".

View 9 Replies View Related

General :: Create Multi-select List Box For All Records In Access 2010 Form?

Jun 3, 2013

I would like to create a multi-select list box for all the records in an access 2010 form.

View 2 Replies View Related

How To Create Filter Button On Form And Filter Records

Nov 26, 2012

How can I create a "Filter Button" on a form and filter my records? I create a textbox on a form and a filter button on the right. Then I click the filter futton, the filter function will search/match the content in the box through the datasheet. And then the results of the filtering will be pop up on the split form datasheet.

View 3 Replies View Related

Forms :: How To Create A Form That Can Edit Or Create A Record

May 13, 2014

I am trying to create a form to enter data in a table. I would like to make it pull in info from a switchboard. If the record already exists I would like it to find it and allow me to edit the info. If the record doesn't exist I would like to be able to add a new record with the data input. What is the best way to accomplish this?

View 1 Replies View Related

How Do I Create A Table That Contains All Records From Two Others

Jul 11, 2005

I'm trying to create a table that automatically contains records for every permutation of the two foreign keys it imports. Let me explain with an example:

I have a Characters table: CharacterID (Primary Key)
CharacterName
CharacterClass
[...]

And, I have a Skills table: SkillID (Primary Key)
SkillName
SkillDescription
[...]

I want a third table named CharacterSkills to combine those two tables. It might look like this: CharacterID (Primary Key)
SkillID (Primary Key)
CharacterSkillSlot
[...]

That looks a lot like a junction table for a many-to-many relationship. The difference is I want this table automatically filled with every combination of Characters and Skills. For example, if I have three characters and five skills this table would contain fifteen records. If I add a fourth character I'd expect this table to grow by another five records (as one record per skill is automatically added).

Here are those same tables with some example data.

Characters table: CHR01, King Loo, [...]
CHR02, Humble Pie, [...]
CHR03, Jayne Bo, [...]

Skills table: SK01, Amity, [...]
SK02, Diversion, [...]
SK03, Banish, [...]
SK04, Guilt, [...]
SK05, Shame, [...]

CharacterSkills table: CHR01, SK01, [...]
CHR01, SK02, [...]
CHR01, SK03, [...]
CHR01, SK04, [...]
CHR01, SK05, [...]

CHR02, SK01, [...]
CHR02, SK02, [...]
CHR02, SK03, [...]
CHR02, SK04, [...]
CHR02, SK05, [...]

CHR03, SK01, [...]
CHR03, SK02, [...]
CHR03, SK03, [...]
CHR03, SK04, [...]
CHR03, SK05, [...]

Any pointers on how to create this magical third table, or whether it' possible at all, will be greatly appreciated.

View 4 Replies View Related

Automatically Create Records

Mar 25, 2008

I have a problem and not sure what the best approach is.

Our study enrolls patients and then re-contacts them every month for 1 year. I want to create 12 new records in "Table2" based on the "baseline_date" and "StudyID" of each patient in "Table1". "Baseline_date" is the initial date the patient is enrolled in the study and "StudyID" is a number created based on information from the patient. Both are unique values. What I want to do, is after the "baseline_date" variable is updated with the date of enrollment on a form I want to trigger VB code to automatically create 12 records in "Table2". "Table2" would have the following variables: "StudyID", "Early_Date" and "Late_Date". The records would be created based on the following.

Record1{"StudyID", "Early_Date=(baseline_date+30)-3", "Late_date=baseline_date+30)+10;
Record2{"StudyID", "Early_Date=(baseline_date+60)-3", "Late_date=baseline_date+60)+10;
Record3{"StudyID", "Early_Date=(baseline_date+90)-3", "Late_date=baseline_date+90)+10;
Record4{"StudyID", "Early_Date=(baseline_date+120)-3", "Late_date=baseline_date+120)+10;
Record5{"StudyID", "Early_Date=(baseline_date+160)-3", "Late_date=baseline_date+160)+10
......
Record12{"StudyID", "Early_Date=(baseline_date+360)-3", "Late_date=baseline_date+360)+10

The -3, +10 gives us a two week window in which to contact the patient. "Table2" containing the newly created records will have a many to one relationship with "Table1".

Any help would be much appreciated.

View 2 Replies View Related

Create Records Between 2 Dates

Sep 25, 2014

Is it possible to define 2 dates and create a record for each day in between? I am creating a "sick occurence" database. I want to define the first day the individual calls off sick and the day they will return, then calculate how many sick days they will be using. However, I need to take into consideration any relief days or assigned time off.

Basically, I want to be able to assign what is going on everyday between these 2 defined dates. Be it, holiday, annual leave, personal leave, sick leave, or regular relief. If further clarification is needed, I can go more in depth.

View 9 Replies View Related

Automatically Create Records In Subform

Apr 11, 2006

I have searched, but found no reference to my exact question. I have a list of drivers I need to create a checklist for each day. The Parent form is the day and the subform is the list of drivers. What I would like to do is have a command button automatically enter all the drivers that are active (denoted by a chechbox) into the tabular subform.

View 14 Replies View Related

Create Many Pages Html How Many Are The Records

Jan 20, 2006

HI!! I've a problem

I have a table with 10 records


I would create many pages html how many are the records :eek:

better still if every page with a various name

It's possible? :confused:

thanks!!! :o

View 14 Replies View Related

Create Automatically Records Into Subform

Aug 12, 2007

Hello
there is a field in my form named "numphotos" and I write the number of photos than that folder contains.

I have a subform in that main form named "descriptions", here I describe, one for one, all photos of that folder.

Itsn´t a problem if the folder contains a few photos, but I have folders that have even 100 photos :confused: then I must to create 100 records in my subform :eek:

I would like than Access create those records automatically according to the number of photos that I indicate at the field numphotos.

My example in photo: http://farm2.static.flickr.com/1141/1093088982_a084bff95f_o.jpg

I only would desire that Access create that many lines to me as I have written on "numphotos". I would write the rest of the information (photographer and description)

is it possible?

thanx!!

windowsXP
access 2007

View 5 Replies View Related

Create Un-aggregated Records Table

Nov 9, 2007

Hi,

I have a database that contains a table with an administration area and a number associated with the “count” of a certain characteristic of that area.

For use in another piece of software I need to convert the count system to individual records. For example I need to go from:

AREACOUNT
AdminArea13
AdminArea22
AdminArea31
AdminArea43
...

to:

AREACOUNT
AdminArea13
AdminArea13
AdminArea13
AdminArea22
AdminArea22
AdminArea31
AdminArea43
AdminArea43
AdminArea43
AdminArea43

I actually don’t need to count field in the new table, but it would be useful for my own quick reference.

The problem is that I do not have the original raw un-aggregated data – otherwise this would not be a problem. Also there is no way I can get this.

I realize that this is working in the opposite way to good normalised databases – however as I said the software that I need to export requires this data in the expanded format.

Does anyone know how I could run a query in access to achieve this?

I have large tables so will need to do this programmatically rather than manually.

Many thanks in advance.

Regards,

Kevin

View 1 Replies View Related

Subform To Query Records OR Create A New One

May 17, 2005

hi,

I am trying to write a training register DB for my department basically:

There are three tables: trainees, training sessions, and trainees on courses.


The training sessions will be mapped out in advance: so that's easy we will plug in the training dates when necessary.

the tricky bit is the booking form for trainees. I'd like a form/subform where the trianing session info is at the top and the subform lists trainess for that day.

Now here's the rub. we may not have the trainee's name in our database already so I created a combo box with the all the known trainees. This way if they exist their details pop up and we have a new "trainee on course" record for them.

So what I need is a macro or some code that will check whether they exist and if not create a new traineee record and then allow us to fill out the booking form. Perhaps I'm rusty and not thinking this through properly.

I'[ve attactched the db in case anyone needs a visual. I'd be grateful for any suggestions

The problem is when we get a new trainee with no history we cant create them. either I have

View 3 Replies View Related

Database To Count How Many Records To Create

May 23, 2005

I have a form which a user selects an activity from a combo box. On some occasions a user may need to enter the same activity a number of times. I want to add a text box/combo box that a user can enter or select a number. When the user hits the submit button i want the records created in the database to match the number specied fied in the text/combo boxes.

I think i may need to use an INSERT statement but totally confused how to do this.

View 6 Replies View Related

Recall - Automatically Create Records

Nov 19, 2004

I have a database with over one hundred employees in. Attached to each employee is a relationship where they can do many activities. How can I automatically create one activity record per employee at the beginning of a day and give the date field in the many part of the relationship the current days date.

I assume you've got to create a recordset and do something along the line of - do until EOF docmd.acrecnew.
But haven't got a clue where to start.

Pease help,
Recall.

View 4 Replies View Related

General :: Create Multiple Records From One

Jun 19, 2012

I have three tables:

tblClient (for basic client information),
tblDischarge (for client discharge information), and
tblAppointments (for appointments that are added to an outlook calender).

All three tables are linked using the IDNumber from the Client table. I have a form where a user inputs a discharge date for the client.

Once that date has been added I need to add 5 records to the Appointments table for different followup times based on that discharge date (such as one month, two months, three months, etc.).

I have the code working to add an individual appointment to outlook but not 5 different ones at one time. So the question I have is how to add the 5 records based on the one discharge date?

View 1 Replies View Related

How To Create Multiple Records In Access

Jan 5, 2012

I am relatively new to Access and have a simple database which I use to generate Publication numbers for our new publications. I would like to have a text box and button on a form that will generate duplicate records of the current record the same number of times as specified in the text box.

E.g. If I need 6 copies of a record I would like to enter 6 in a text box, click a command button that will generate 6 duplicates of that record.

The code in order to do this 'on click'.

Table = Publications
Form = Publicationsfrm
Text Box = Lines
Command Button = Submit
Primary Key = PublicationNo

I have tried the following code but it is not working.....

Dim i as Long, myRS as Recordset
Set myRS = CurrentDB.OpenRecordset("Publications")
For i = 1 to Me![Lines]
With myRS
.AddNew
![PublicationNo] = Me![PublicationNo]
.Update
End With
Next

Alternatively if I have a duplicate record button that uses a macro is there a way to run that macro the specified number of times in the 'Lines' text box.

View 14 Replies View Related

Tables :: How To Create ID Based On Number Of Records

Nov 26, 2014

I have a table with an empty column called ActionID. I need to generate a numerical number that begins with 5000 and goes up by 1 number on each saved record. I have a basic form that links all of my other field to the table except the one I need to generate (ActionID) but will need that number saved to the table once its created.

View 11 Replies View Related

General :: Create X Number Of Records With A Button

Apr 8, 2015

I know this has probably been gone over, but I'm just looking for a super-simple way to put a button on my form that will create a number of records equal to the number of days in the month listed in a field. For instance, if MyField is "4/1/2015", I'd like the system to create one record for each date between 4/1/15 and 4/30/15.

I have scoured the forums, and I find many threads on creating multiple records, but none of them deal with the same type of thing I need. I have a field, called MyField, and I have a table called MyTable with a column called MyDate. I want to enter a date into MyField, then click a button, and the button will run code/macro/whatever that will create multiple rows in MyTable, one for each date in Month([MyField])

View 8 Replies View Related







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