Forms :: Use Records ID But It Hasn't Yet Been Created

Aug 24, 2013

I'm in a form that creates the new company in the companies table. Then I want to leave a note in the notes table using the newly created company_id. Of course that id does not yet exist. What's a good way to accomplish this?

Code:
Private Sub b_EnterSave_Click()
Dim stDocName As String
stDocName = "company_quick_enter_form"
Dim CompanyIdStr As Integer
CompanyIdStr = Forms.company_quick_enter_form.Form.company_id

[Code] .....

View Replies


ADVERTISEMENT

Forms :: View Newly Created Records?

Jun 10, 2014

I have a piece of code that is creating new records when the form loads using recordsets.

I need a subform to show only the newly created records

View 14 Replies View Related

Forms :: Records Don't Show When Created From Blank Form?

Aug 29, 2013

Very suddenly today, when I'd done seemingly nothing, all of the records from my form that I'd built from a blank form disappeared, with the exception of the first record. When I try to just close everything down, nothing changes. When I put in a new record to the form, however, it's saved in the table. But when I save and close, the form goes back to only having the first record! This is very annoying, for easily perceivable reasons. I even tried creating the form from scratch, to see if it's some residual SQL update code acting funny, and nothing changed! It seems to work if I select a table and just create a form, though. It doesn't even work when it's a splitform and whatnot.

View 1 Replies View Related

Forms :: Duplicate Records Created Using Two Subforms In Main Form

Jun 23, 2014

I have created a database in microsoft access 2010 to show invoices for different customers in different countries. In doing so, I created using a two subforms in a main form. I have used the "country name" to link the subforms to the main form. When I enter new records into the subforms for a specific country, I realized that a duplicate record of an old record are being created in the subforms. What can I do to prevent this from happening? I tried to change the query link between the main form and subform to "invoice number" but the same problem has occurred.

I am novice to microsoft access 2010 ...

View 3 Replies View Related

Queries :: Return Most Recently Created Records?

Mar 3, 2015

query to return the most recently created records in a composite key field, and only the most recent ones.

there is a screenshot of the composite key field attached

I want to get te records with the highest InvoiceID, there can be multiple records with the same InvoiceID and I want to get all of them.

Using the screenshot as an example I need to query to return the last two records as they both have the Same, highest InvoiceID.

View 6 Replies View Related

Modules & VBA :: Message Box To Display Records That Have Just Been Created

Jul 24, 2015

I have a button that duplicates records 'X' amount of times based on a value in a text box.

I need a message box to advise the user that they have created record number from - to

Eg

User creates 5 records - first record created has a auto number of 3200

I need the message box to say 'you have just created records 3200 - 3204

Is this possible?

Here is the current code on the duplicate button courtesy of Uncle Gizmo

Private Sub AddRecord_Click()
On Error GoTo AddRecord_Click_Err
Dim x As Integer
For x = 1 To (Me.txtAmount.Value - 1)
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdCopy

[Code] ....

View 2 Replies View Related

Displaying Form Records Created By User And Specific To A Date

Jul 24, 2005

Hi,

I was wondering how difficult it would be to do the following:

1. A user opens up a form.
2. The user uses a combo box to select his/her name.
3. There is a date combo box on the form and by default, it is set to today's date. So when the user selects his/her name, the records for today are displayed. Changing the date will show only the records for the date shown.
4. The user will have the ability to add and delete records specific to the criteria chosen in the text boxes. Adding new records will only add records for the date chosen in the combo box. E.g. if he/she adds a record for today, it will only be seen when today's date is selected.

Will a subform have to be used for something like this? Or could it be done with one form using filters?

Any thoughts and/or approaches on this would be greatly appreciated.

TIA.

View 3 Replies View Related

Automatically Adding New Records In 5 Other Tables When ID Is Created In Main Table

Jan 13, 2008

Okay I had an idea and I thought I might get ffedback as I am relatively new to this. I went through a period a couple of years ago when I used access alot and was becoming familiar with VBA etc but I havent touched it in 2 years so Im pretty rusty.

I am running a study and need to have to create a database that:

a. collects data about participants
b. Has a number of questionnaires (5), each of which can be filled out by participants.

THe main table has a number of fields that collects info about the participants the most important of which will be the ParticipantID - an automatically generated number which is my primary key.

In table 2/form 2 I will host questionnaire one. This will be linked to Table 1/Form 1 (Particpant Information) by this tables primary key - also the Participant ID. The relationship will be 1:1. Each participant can only have one Participant ID and will only need to fill out questionnaire one once.

Is it possible that when I add a new participant to the Participant Information table/form I also automatically create a record in Table 2/Form 2 (Questionnaire 1), as well as Table 3/Form3 (Questionnaire 2) and so on so that they have the same ParticipantID...?

I was reading a similar query somewhere else and they said to use the Form_AfterInsert Event command? Is this right (see here http://www.pcreview.co.uk/forums/thread-1687644.php)?

I feel a bit stupid but I am willing to learn and try new things Once I get started I think I will be okay. If you could steer me in the right direction it would be much appreciated.

View 12 Replies View Related

Should Forms Always Be Created From Queries

Jul 1, 2005

I've read quite a few posts and noticed that quite a few people have said that forms should be created from queries. Is this personal preference or a must.

Like I said on a previous post I am going on a one day Access soon, so maybe I should stop reading and playing until I have completed that, but my mind is running away with what I want to do.

View 14 Replies View Related

Forms Created From Starting A New Switchboard

May 13, 2006

This is probably elementary, but I'm entirely lost. Here's my issue:As most of you probably know, when first creating a switchboard in a database will automatically create a form based on it.Somehow I managed to delete that form, and have no idea how to make a new one with the same default switchboard format (where command buttons are automatically generated, and there's a default title label with the shadow effect, etc.)I thought I might try to just delete the switchboard and create a new one so that another form would be created, but it won't let me delete the switchboard!If I understand correctly, I have to create a switchboard without any other switchboards already existing for Access to create a related form for me. Any suggestions?

View 6 Replies View Related

Can't Save Forms Created By Form Wizard

Jan 2, 2006

guys hello
i'm having a very weird problem i'm using access 2003 and when i'm creating a form using the wizard for the forms i can't save him i when i'm pressing the X button i'm getting the dialog to save the form and promted for the form name but it doesn't do anything and the form do not closes , when i'm creating forms by manual this problem doesn't appeares . i'm already (uninstalled and installed ) * 5 office , installed windows again , deleted the office dir , deleted the shared office directory cleaned the registry installed another version of office and no effect . i would appreciate any help thanks.
Igor

View 3 Replies View Related

Forms :: Printing Report Created From A Query

Oct 2, 2014

I've created a form that prints a report created from a query.

I want the form to have two print options - to either print by Date OR Job # and I want the data pulled from the same query.

Right now I have the criteria setup in the query for the Date and Job # fields to:

DATE: [Forms]![Job Cost Form]![Text0]

JOB #: [Forms]![Job Cost Form]![Text1]

...It works if I only have one criteria setup, but does not work if I try both.

Is this possible??

View 2 Replies View Related

Forms :: Created A Form That Has A Drop Down Menu To Select A Name

Mar 25, 2015

I created a form that has a drop down menu to select a name. I attempted to set it up so that once a name is selected, another form is opened with that person's information. I was able to get it set up so that the first form closes and the second form comes up, but I can't get it to filter the name. I tried using SetTempVar and then SearchForRecord, but got nothing. I tried using OpenForm and Where Condition equals the search, but just got the automation error. It is currently set up using SetTempVer, OpenForm, SearchForRecord.

View 3 Replies View Related

Forms :: How To Put Cursor On Newly Created Record After Requery

Apr 14, 2015

I launch a 'CreateNewRecords' form from a 'MainForm' form. When the 'CreateNewRecords' form closes, the new record is visible on 'Main Form'.The underlying query is unsorted, so this code in the AfterUpdate event of 'CreateNewRecords' puts the cursor on the last record displayed on 'MainForm', which is the newly created record:

Forms!frmMainForm.Requery
With Forms!frmMainForm.RecordsetClone
.MoveLast
Forms!frmMainForm.Bookmark = .Bookmark
End With

However, I intend to sort the underlying query, which means that a newly created record may appear in the middle of the records displayed on 'MainForm'.

What I want to have happen is that after a new record is created by 'CreateNewRecords', the underlying query is requeried so that all current records are displayed on 'MainForm' but also that the cursor rests on the newly created record (rather than default to the first record).

View 7 Replies View Related

Forms :: Display Date And Time Based On When Record Was Created

Jun 30, 2013

I have set up a form and only want to display the date and time that will appear automatically based on when the record was created. I definitely don't know how to do this.

The format that I'm looking for is: 07/24/13 11:45:44pm

From what I can see I would need two separate fields to accomplish this. I would prefer to only use one if possible. I would like to execute the value within the new record as it is entered. That date and time from that point should never change.

I will want to use the date and time in the future for quality control.

View 3 Replies View Related

Forms :: Capture When Record Has Created And Data On A Form Changed

Mar 28, 2013

I need to know when:

* a new record has been created
* data on a record has been changed

Does the On Dirty event capture this, or can I just use the forms On Change event?

View 2 Replies View Related

Forms :: Created A Form With Combo Box Which Shows Certain Fields Selected

Feb 18, 2014

I have created a form with combo box which shows certain fields I selected. By clicking that I want to open a NEW form which has all the fields so that I can edit the record.

View 6 Replies View Related

Forms :: Duplicate Record Created Each Time In Customer Relationship

Sep 14, 2014

I am creating an access database for recording calls and follow ups for a company

relevant tables
mst_customers
card_call

ID from customers and customer_id from card_call have a one to many with all records of card_call

Although its more elaborate than this, lets get down to the problem

I created a form with a subform that should basically allow selection of customer and based on this, the creation of records in card_call as per customer selected. form and subform are linked by customer_id

Everything is working except a peculiar issue where if i select a customer_id it shows all relevant records + an additional record (usually 1 or 2) that just changes the customer_id for that record.

Example

customer_ID = 2 (combobox bound to column1 and showing name/column2)

output
call_ID | Customer_ID
1 | 2
2 | 2
3| 2

changing customer_id to 4 will change to
1 | 4
(new) |

View 1 Replies View Related

Forms :: When Duplicating A Record Duplicate Is Created But Form Remains In Edit Mode

Feb 25, 2014

I have a form with a duplicate record button.Sometimes when duplicating a record the duplicate is created but the form remains in edit mode (small pencil in the form margin).I also have a manual record counter on the form which does not refresh to the newest record number following the duplication? Both issues happen together and not independently.

I now have the standard MS Access record counter visible on the form to see whats happening and this always jumps correctly to a new record number when duplication is triggered, so when the problem happens the MS Access counter is showing one more than my own record counter.

If I use the standard MS Access record navigation buttons and go back and then forward by one record, the duplicated record is then corrected. The edit mode pencil is gone and both record counters read the same, which I assume has happened this has forced a save to happen

If Me.Dirty
Then Me.Dirty = False
End If

- in the current event of the form, would solve the problem, but it doesnt make any difference at all, its still no better, or no worse than before?Using CTRL + S removes the pencil, but doesn't correct my bespoke record counter?

View 6 Replies View Related

How Do I Get The Newly Created Key?

Jun 27, 2007

I have tables which I add a new post to. But I want to find its key. DoCmd.GoToRecord , , acNewRec
'Lot of data fills out the different textboxes
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.Requery
When I first save the data and the requery the you should expect the ID field on form to have the new unique number but it doesnt. Can you get the current unique ID on some other way?

View 2 Replies View Related

New Files Being Created

Nov 27, 2007

I have created an Access 2007 database on a network drive. I notice that as the database is being used, other files are being created sequencially such as, "database1", "database2", "database3", etc. What are these files. They are quite large and I am wondering if they are necessary.
If anyone has any information, I would appreciate it.

thanks,

View 5 Replies View Related

Synopsis - After A DB Is Created

Mar 27, 2008

I am trying to understand what’s next after a database is created (meaning it is functioning, but not ready for multi-user environment and not secured yet). By reading various postings and some articles, it seems these are the key steps I need to follow in order to have a database ready to go.
1. Once the database is ready and tested (at this point I am the only user and have full privileges to the database), I need to do the split – front end/back end (by using Access split wizard).
2. Then I save the back end on a shared drive to which the respective users will have access.
3. Next I secure the back end.
4. Then I create users group(s), and assign user ID/password for every user.
5. I install the front end to every user’s PC so they can begin to use it (not sure how to do that - some help is appreciated here!)

Is this close to what the process would be (even very oversimplified) or I am too far from the truth?! :confused:

Thank you in advance!
Atol

View 6 Replies View Related

Extra Mdb File Created

Jan 1, 2006

Hi All,

For some strange reason, a replica db is being created along side the original. I don't believe it's a back up since the name back_up usually appears in the file name. I've seen it happen once when the proper mdb file was opened and then noticed the new db was created (always called db1.mdb). It's a permanent file mdb file and not the record locking icon. I remember over the summer someone posted a similar problem but I haven't been able to locate that thread. Any suggestions?

Thanks

View 2 Replies View Related

1 To Many Relation, 1-site Is Not Yet Created

Apr 11, 2006

The problem:
I have a table: TBL_INVOICES
and I have table TBL_SHIPMENT_NOTES
One invoice can have many shipment notes, so a created a
One to many relation between TBL_INVOICES and TBL_SHIPMENT_NOTES

However, the shipment notes are created earlier, thus there is no
invoice_ID when I create a shipment note.

How to deal with this problem ? Please, help ...

View 3 Replies View Related

Date Update And Created

Aug 11, 2007

Hello,
i would like to add in my database two fields: date update and date created automatically, but how?

thanx
sorry for my english...


windowsXP
access 2007

View 14 Replies View Related

Adding To Already Created Data

Jan 28, 2007

Hi folks

I have just devised a simply database but as usual when using it I found that I had left out some information.

To simplify - I could for example, make a drop down menu with the letters a-z but when finished realised that I had left out the letters K, L & R. How do I insert the missing data into the already created list?

Thanks for your help

Eulum:)

View 2 Replies View Related







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