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 Replies


ADVERTISEMENT

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

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

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

Queries :: Create Series Of Records Automatically

Jul 5, 2013

I have a table in access which captures a couple of bits of information. The database is for tenant management and payment records. This is what i am trying to achieve:

In one table I record payment information, when they paid, and how much they paid.

In the lease table I capture information such as first pay date, and the payment schedule, whether this be weekly, monthly, fortnightly etc.

I would like to create a table of sorts which has the next twelve months worth of payments dates. Then when i add a payment to my payment table it will match it up with the correct payment date. This will allow me to track arrears and missed payments.

View 3 Replies View Related

General :: How To Create A Database That Updates Records Automatically

Jul 1, 2015

I want to create a database that keeps track of contributions of members of an association. Every member can voluntarily give a standing order to contribute a fixed amount every month. A member can as well decide to review his/her contribute.

how I can come up with a database that can automatically add the contribution of a member monthly without manual input since the stated contribution is known. So that I can run a report for individual member and the report can capture the every monthly contribution that has been added automatically and shows when ever a member changes his/her contribution amount.

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

Modules & VBA :: Unable To Create Duplicate Records On A Subform?

Nov 20, 2013

I am working with a sub-form where once a staff member enters there sub measure I would want to create a duplicate of that record. The problem I am having is that once you enter the sub-form and click the duplicate button it creates a duplicate of the record selected but overwrites the first record in the table. I want it to create a new SubMeasure Number which is the primary key and assigns the record the next available number.

Also if I try to add another record after one has been added I get runtime error "3021" - No current record. I would have to close the form and reopen for it to be able to add again.

I have attached the code below:

Private Sub cmdDuplicate_Click()Dim dbs As DAO.Database, Rst As DAO.Recordset
Dim F As Form
'Return Database variable pointing to current database
Set dbs = CurrentDb
Set Rst = Me.RecordsetClone

[code]....

View 4 Replies View Related

Forms :: Select Multiple Records In Subform To Create New Table

May 21, 2013

I need to create some new records based on main form data and a selection of records from a sub form. The main form and sub form have different sources. I wanted to show the source fields in the sub form along with a check box to allow the users to select individual records. The record source for the sub form contains >1000 records, so the user will first enter data in the main form, use filters to find the records he wants to 'assign' to the main form data, click those he selects, then click a command button in the main form to create the record(s) based on the main form data and the selected records from the sub form. The new records will be appended to a new table.

View 6 Replies View Related

Modules & VBA :: Create X Number Of Duplicate Records According To A Field On Subform

Jun 13, 2013

I have a code that works great from the parent form but I decided to change the format and call it from a lostfocus event in the subform instead. Now I keep getting error 3314:"You must enter a value in the tbGuests.LastName field".

The code should copy the parent form fields and create x number of duplicate records according to a field on sub-form. It then runs an append query to add the information from the subform.

Code:

Private Sub GuestsInParty_LostFocus()
Dim partymsg As Integer
Dim dbs As dao.Database, rst As dao.Recordset
Dim F As Form
Dim intHowMany As Integer
Dim intCounter As Integer

[code]....

View 1 Replies View Related

Forms :: Automatically Updating Fields In A Subform From Another Subform

Feb 11, 2014

I am having trouble figuring out the method to automatically update some fields in SubForm from 2 other SubForms.I have attached 2 pics, the first GradeEntry1 shows what the tblTopic_Class_Grade form looks like after I manually enter everything into it. GradeEntry2 is what the form looks like when I fill out the Form starting at the top.

I'd like the tblTopics_Class_Grade form auto-populate the TrainingClassID (it currently does this), TopicClassID, StudentID, TrainingTopicID based off the entry from the above forms.My end goal is that I need to have a grade for each student on each training topic for each class. Like:

Class1-Student1-Topic1-GradeX
Class1-Student1-Topic2-GradeX
Class1-Student2-Topic1-GradeX
Class1-Student2-Topic1-GradeX

View 6 Replies View Related

Automatically Create Snapshot Reports

May 22, 2005

Is there a way via code in a module to automatically create a snapshot of a report, save it in a specifed folder location in the code and save it as the current date as the file name when a button is clicked.

I'm looking on how to do this as I have many reports to create, move to an intranet folder and then name it to the current date. It will save me lots of time if this can be done automatically.

I am using MS Access 2000 and the folder location will be on my hard drive.

Thanks
Aden

View 2 Replies View Related

Automatically Create A Table Entry

May 10, 2007

In my DB I'm tracking seed. I have a form that I enter in some info in and an ID number is created (based on that info). Then in a different form I track "events" that happen to that ID (drying, moved, bagged). Is it possible to have a button or something like that that after my ID is created from my frmHarvest to automatically generate an event in tblEvents that has the date the ID number and then have something like Harvested in the description field?

If possible can I get some hints on what to do?

Thanks,
Rick

View 7 Replies View Related

Can Create Primary Key With Macros Automatically

Sep 2, 2015

can I create primary key with macros automatically.

I have created table with Query and I need primary key in this table. I put new field for primary key but after restarting it was delete every time.

View 14 Replies View Related

Forms :: How To Create A Field In Table Automatically

Jun 29, 2015

I have a form and it has a field as question. I also have a field as I'd in this form from the same table that is autonumber. I want that for each field the question will be created automatically in the table as below:

Is epm ( my Id field) is created
Is epm and is created are string

They should also include Id number of each row. So It would be like:

Is epm -1 implemented
Is epm-2 implemented
.
.
For each row

View 7 Replies View Related

Queries :: Create Application ID Automatically By Continuing Number

Feb 3, 2015

I am using an attendance management system with a DB in Access. Now I want to create APPLICATION_ID automatically by continuing number. For example, I have a table called "LEAVE_APPLICATION" and the structure is below:

EmpID Leave_Type_ID APPLICATION_ID

00360 2 1
00360 2 2
00360 14 3
00360 14 4
00360 8 5
01390 8 1
01390 8 2
01390 14 3
01390 14 4

Now I want to update the table by adding the below data

00360 2
00360 2
01390 14
01390 1

How can i create the APPLICATION_ID field auto generating while pasting additional data. It should be numbering continually from the last record (Grouping to be applied for EmpID)like below:

00360 2 6
00360 2 7
01390 14 5
01390 1 6

View 2 Replies View Related

Create / Update A New Table Automatically Based On Two Other Tables?

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

Way To Create A Query / Table Where Access Automatically Makes A Due Date?

Aug 11, 2015

I use Access 2013. Is there an easy way to do the following: I have a contract that starts on eg 01/07/2015. Tenant has to pay 100 each month. Is there a way to create a query/table/... where access automatically makes a due date? EG: Joe needs to pay me 100 each month, starting 01/01/2015 until 31/12/2018.

This means:

01/01/2015 - due 100 from Joe
01/02/2015 - due 100 from Joe
...
01/12/2018 - due 100 from Joe

View 1 Replies View Related

Create Random Number To Be Automatically Generated As Default Value For Record ID

May 28, 2015

I've been building a CRM in Access that allows for creating profiles for our accounts. When we add a new account, I'd like an Account ID to automatically generate and look like this: CRMXXXXX where the X's represent a random number. I originally wanted to set the field as autonumber to just count up, but unfortunately I need to append this value to another sales database we have; you can't store the text "CRM" with an autonumber in a table.

Right now, all I've done is place an equation in the default value of a textbox I have on my 'Add Account' form. I then made the control source of the text box the Account ID field. My equation is as follows:

="CRM" & CStr(Int(Rnd(Now())*10000))

This appears to work, as it generates a value in the correct format. However, I've realized that each time I open the CRM, the random numbers start over again and I run into issues of trying to create a new record with the same ID as a previously created record. I assume I need to incorporate some sort of timestamp to it in order to change it.

View 5 Replies View Related

Modules & VBA :: Create A Form Button That Will Automatically Email Each Row Of A Query Result

Jul 22, 2015

I am trying to create a form button that will automatically email each row of a query result to myself. At first the VBA code worked fine with a standard query. However when I use it with a query that contains a reference to a combobox form such as "<=[Forms]![Reminder]![Monthsleft].[Value] And >=0" I get the 3061 run-time error and "Too few parameters. Expected 1." I have included the VBA code below.

Private Sub Command9_Click()
Dim MyDb As DAO.Database
Dim rsEmail As DAO.Recordset
Dim sToName As String
Dim sSubject As String
Dim sMessageBody As String

[code]....

If you intend to renew the lease, terms and conditions will need to be submitted for ECC for approval (regardless of changes or not in lease rates). If the terms have yet to be confirmed, it is important to begin the negotiation process as soon as possible with a target to provide the ECC submission at least two months prior to the commencement date of the renewed lease. To ensure sufficient time for ECC approval before the contract expiry date, please prepare the ECC paper and obtain necessary endorsements. Submission details can be found here. The ECC submission template and PSD Questionnaire could be found from this link

DoCmd.SendObject acSendNoObject, , , _
sToName, , , sSubject, sMessageBody, False, False

.MoveNext
Loop
End With
Set MyDb = Nothing
Set rsEmail = Nothing
End Sub

View 2 Replies View Related

Unrelated Subform Not Updating Automatically

Oct 22, 2006

This may be a simple question, but I'm not sure what to even search for. I have a form with multiple subforms. All the subforms have related fields that are linked via relationships. But one subform has no fields in common with the parent form.

I need to be able to have the subform update itself whenever the record is changed on the parent form. I can't figure out which event procedure to use. It updates correctly if I assign my procedure to the form_click sub, and then click each time I want it updated, but that's a pain. I've tried on load, on data change, on activate, on data set change, and a couple others, but nothing works automatically.

How can I make the subform run a subroutine each time the parent form changes records?

View 4 Replies View Related

Automatically Populate First Line Of Subform

Dec 10, 2004

i have a form frmCreditNote with a subform sfrmCreditNote. They are linked by a creditNoteNumber.
As soon as i pick a customer in the main form, i want the first line of the subform to have that customer name as well.
If I change the customer name in the main form, I need the first line of the subform to correspondingly change as well.
If the form was new, i would open a recordset and use .AddNew to put in the new first line date
If I was updating the form customer name, then I would need a .Edit to change the first line of the subform.
My question is : how do I determine if the subform is empty? Is it a command likeIf subform.HasData, orIf IsNull(?)Please let me know thanks

View 1 Replies View Related

Forms :: Subform Not Saving Automatically

Dec 23, 2013

I have one problem with subforms. I have one bound main form and two bound subforms: one subform is used to display existing records in datasheet view while another is used to enter new records in form view, but this latter subform for new records will not save automatically, nor will it save by using the me.refresh or me.dirty=true in the unload event of the subform control. The parent child relationship is intact. I can even see the primary key of the new row in the subform but it does not appear in the table that the subform is based on. This primary key adds by one automatically.

I have struggled and finally made work a combo box in the main form that finds existing records but also is able to add new records when the value entered is not on the list. Below is the code I used. I am not sure if this code is overriding Access's save ability of the subform?

Private Sub Combo316_AfterUpdate()
Dim n As String
gblvariable = cbobox
Me.Requery

n = DLookup("ID", "[Customers Extended]", "[Customer Name] = '" & Me!Combo316 & "'")

[Code] .....

View 14 Replies View Related

Automatically Update Value In The Subform From Crossstab Query

Oct 10, 2006

Hello,

I have a main form which has 2 subforms. The main form is the name of the Student. The first subform is the data entry form. It has 2 fields. One for the Trimester - a drop down which has "1, 2, 3" listed. And the second field is the benchmarks (again drop down). Now the second subform is a more elaborate way of viewing (only for viewing purposes) which standards have been chosen for which trimester. Now this form's control source is a Crossstab query, which updates the Trimester field for each of the benchmarks for the particular student.

Now my problem is I am trying to update this subform which is for viewing purposes only, automatically, so that the moment a benchmark is chosen on the other subform, the [trimester] field automatcially gets updated on this form. All the benchmarks are listed on this form (view form) and a field which is the trimester field. Data entry is not allowed in this form. So the information has to get updated automatically. It does when I close and open the form, but thats not how it should work.

I tried everything I thought possible (requery, refresh, a button to click) but couldn't get the form to update.

Please help! I would really appreciate if you could help me find a solution.

Thanks in advance

A

View 1 Replies View Related

Modules & VBA :: How To Automatically Set Cursor To First Record (in Subform Of A Tabcontrol)

Oct 31, 2014

All I have a form called frmMain. This form contains a TabControl named tabMain tabMain has some pages. One of the pages is called pagRecords pagRecords contains a subform called frmRecords. frmRecords contains records from an in-memory table.

My problem: If I select tab pagRecords the cursor is set to the last record.

What I want: as soon I select tab pagRecords, the record cursor must always be set to the first record.

I think this can be done with next code.

Code:

DoCmd.GoToRecord acActiveDataObject, , acFirst

However, I placed this line in a lot of event properties but it is never triggered (I put a break on the line).

So on which object and event should I put this line? (and is acActiveDataObject the right parameter?)

View 2 Replies View Related

Subform Automatically Add New Record And Save It With Default Settings

Apr 13, 2015

I Have a main form called table one has 3 fields an autonumber as primary key and i have a subform called table 2 has 3 fields one an autonumber a primary key , second is an integer which is equal to table 1 primary key, and third is a text with default value set to N/A

i want when the user enter info in the main form and save it, the subform automatially add new record and save it with default settings..so far what s happening , that the related field in the subform to the main, is getting change but record is not getting save in the table 2

View 4 Replies View Related







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