Inputting A Vaule For A Record When Creating A New Record

Feb 1, 2006

Well from reading the forums i have learned alot about access but now i am stuck and can't find what i am looking for.


I am building a database basically to track the Software bought for our company.

I have my Application table and my purschased table. The relationship between the two is ApplicationID.

What i need is to be able to do is look up the ApplicationID and then have that vaule be added to the new purschase record. My method of doing this was to created a form with 3 list boxes and 1 text box (not viewable). The list boxes are Company, Application, Version. The text box is the returned ApplicationID.

The list boxes dynamically adjust based on your selecetion to find the vaule of the 1 text box "ApplicationID".

Once you have selected the application you want to add as a purschase i have a button to open the Purschase form. I have everything that needs to be filled out in the form. My problem is getting the vaule of ApplicationID in the purschase form for the new record.


My problem;

Right now when the Purschase form opens it as all the data and the ApplicationID is shown as being correct but not selected. Right now the user would have to manualy select the vaule for the data to be commited to the record.

How do i selected a record so the data is submittied and a new record is started, on open, then set the focus onto a new field. This way the user does not have to do it manually.



I hope that makes sense to everyone.

View Replies


ADVERTISEMENT

Forms :: Stop Access From Creating New Record When Inputting Data In Field Or Tab

Dec 17, 2013

How do you prevent access from adding a new record when u input data in the current record or tab to the next field? My database is set up to open with a form where the user picks his name and then a week ending date once that is complete u open a new form where the name and date auto populate along with other fields to fill out such as job charge, charge type , times charged for each day of the week. But I don't want access to create a new record everytime the person inputs or tabs..... .

I have attached my database for better clarity!

View 9 Replies View Related

Preventing Record Selector, Creating New Record

May 18, 2005

Hi All,
I have a form that when loads, runs some VBA on the "On Current" event.
Some of that code, fills in text boxes, with concatenated (?) strings.
So every time I use the record selector and get to the end of all the records, the "On Current" fires adds the concatenated string (even if it's empty), and that then becomes a new record! Is there some way i can prevent this, but still keep the "On Current" event, some type of logic I could run before the concatenations etc.

Any Help would be appreciated.

Cheers

BAzZ

View 2 Replies View Related

Creating New Record When Record Is Edited?

Feb 20, 2015

I'm working on a project that has project start / end dates which can change. A report is created based on this data. The customer wants me to save all changes as a new record and disregard the older record when the report is created. I was thinking that I would add a (yes/no) column that marks the new record as the most recent (yes) and marks older records as (no). Then I would modify the query for the report to only include records with 'yes' set to true. I was also thinking that I should create a second table that has a foreign key for the original record from the main table. The main table would have the most recently edited record while the second table would have the previous records. Which method should I use?

View 3 Replies View Related

Creating Copy Of A Record

Feb 8, 2006

Hi,
I have a Edit Form, where users edit the customer information. I want to add a Button which creates another copy of the same record in the table.
How Can I achieve that? any suggestions?
Regards
-KJ

View 4 Replies View Related

Creating A New Record After Update

Mar 13, 2014

I have a table called [Tasks] which has the following relevant fields:

[Task ID]
[Location]

I have a form that people use to create new tasks and update current ones. Location on the form is a combo box where people can pick from 5-6 different locations.

After someone selects a new location from the combo box and changes the task location, I want to create a new record in a table called [Task Progress] with the [Task ID] of the task whose location was changed, the new [Location], and the [Date] and [Time] it was changed. It would look like

Code:
[Progress ID] [Task ID] [Location] [Date] [Time]
1 5 Station 1 1/1/2011 12:13:01
2 8 Station 2 1/3/2011 01:53:29
3 5 Station 2 1/5/2011 11:13:05
4 5 Station 3 1/6/2011 12:35:22

What should I put in the AfterUpdate event for the [Location] combobox to make the above happen?

Note: All my tables are ODBC linked to SQL Server (can't use data macros).

View 3 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

OPENING Form And CREATING New Record

May 4, 2007

hello,
I have form "QUOTE" (which has a check box "GenerateOrder") and form "WORK_ORDER". Once I click on "GenerateOrder", I want form "WORK_ORDER" to open, and I want to assign a value from a txtBox in form "QUOTE" to another txtBox in form "WORK_ORDER" creating in this way a new record on form "WORK_ORDER". I want to make clear that as soon as the value is passed or assigned to the txtBox in form "WORK_ORDER", a new record for this form should be created.

I tried this code:

Private Sub GenerateOrder_Click()
If (Me.GenerateOrder.Value = True) Then
DoCmd.OpenForm (WORK_ORDER)
[Forms]![WORK_ORDER]![QID] = [Forms]![QUOTE]![QID] 'assignment
End If
End Sub

but it doesn't work

Thank you very much

View 2 Replies View Related

Creating A Message Alert On A Record

Feb 13, 2008

Hi

I am trying to create an alert function so that when a user open up a form and displays a record, it will also display any alerts that have been created for that record. e.g. missed payments etc.
I have created a table to store the alert data along with the job number to which the alert relates so in essence I can have more that one alert per job record. I amtrying get one of the alerts to display ok using the following code

alerts = DLookup("[Job _Number]", "Alerts", "[Job _Number]='" & Me.Job_Number & "'" And "[Start_Date]" >= Date)

You will see that I am trying to only display alerts that are within the valid date range (I have not yet included [End_Date] as I cannot get the code above to work.

Can anyone help me correct this code please?

The other thing is that because I am using a dlookup, I am assuming it will only display the first alert it finds in the table and that's it? If so, how do it get it to display all 'active' alerts with a matching job number. By active I mean where the Start date is >= Date() and End date is <= Date()

I would really appreciate any help on this..

Thank you all for reading.

View 4 Replies View Related

Creating Spreadsheet For Each Record On A Form

Dec 16, 2004

I am trying to put a spreadsheet on a form that will allow me to enter data on the spreadsheet and store the information for each record.

Example: I have patients that I am using a combo box to bring up their name and address information. I want a spreadsheet tied to each patient that I can keep a running total of their payment history. Is this possible and How? Thanks for your help!

View 1 Replies View Related

Forms :: Stop TAB Creating New Record?

Sep 16, 2014

But I use one for creating new records in a table.

And one to View/Edit exiting records.

When I open an existing records, and tab through the fields. Once I pass the last field it creates a new record.

View 2 Replies View Related

General :: Creating New Record After Update

Mar 13, 2014

I have a table called [Tasks] which has the following relevant fields:

[Task ID]
[Location]

I have a form that people use to create new tasks and update current ones. Location on the form is a combo box where people can pick from 5-6 different locations.

What I want:

After someone selects a new location from the combo box and changes the task location, I want to create a new record in a table called [Task Progress] with the [Task ID] of the task whose location was changed, the new [Location], and the [Date] and [Time] it was changed. It would look like

Code:
[Progress ID] [Task ID] [Location] [Date] [Time]
1 5 Station 1 1/1/2011 12:13:01
2 8 Station 2 1/3/2011 01:53:29
3 5 Station 2 1/5/2011 11:13:05
4 5 Station 3 1/6/2011 12:35:22

What should I put in the AfterUpdate event for the [Location] combobox to make the above happen?

Note: All my tables are ODBC linked to SQL Server (can't use data macros).

View 1 Replies View Related

Creating New Record From New Data In A Different Table

Oct 12, 2012

I have an access database that I use to manage my car dealership, part of it holds data of a stock vehicles, another aspect is invoicing.As part of the invoicing form, I have a part exchange vehicle section which creates a new record in the part exchange table.

What I would like to be able to do is when a new vehicle is added to the part exchange vehicle table it automatically adds it to the main vehicle table so it shows as a stock vehicle.

View 1 Replies View Related

[Enter] Character Creating New Record During Import

Dec 14, 2007

Hello all. I've tried searching the forums as well Google for an answer for my problem, but perhaps I'm not searching on the correct key words. Would someone please point me to a post that addresses the below issue.
My company has a customer service (CS) application where our CS agents document CS requests. For reporting purposes, they drop a text file containing open service requests that I then import in Access 2003 so I can analyze the data. I've had the vendor use È (ALT+0200) as the delimiter and double-quotes to enclose text.
This has been working well until the application vendor upgraded the app last week. Now, whenever a user hits the [Enter] key to create a new line in the comments section of the application, a new line is created during the import process into Access.
When I view the text file I can see the Enter Character because it is displayed as  (except it looks more like a rectangle standing in its short side.)
I thought if creating a macro to run on the text file to delete the enter characters, but I can't find a way to systemically find the character. So far, the only solution on my end is to manually delete the characters, but that's unrealistic because there are thousands of records.
Thank you in advance for pointing me to a helpful post or commenting here.
Stephen

View 5 Replies View Related

Creating A Form With Multiple Checkboxes (one For Each Record)

Apr 10, 2005

I have a form. In that form I want to display a series of dates from a database table..ex. 12/15/2004, 12/16/2005, etc... Next to those dates I want to have a checkbox. The user should be able to click on that checkbox if they want to sign up for that date. So there could be more then 1 checkbox checked, but there will always be atleast 1. So my first question is, how do I make this work. I've tried several things and everytime I check on the checkbox it checks all of the checkboxes.


PLEASE HELP!


Subject 2: Regarding the above question, how do i reference those dates that I've checked the checkbox next to, to put into another table?


PLEASE HELP!

View 1 Replies View Related

Creating New Record In Main Form From Subform

Aug 4, 2005

Hi,

I want a user to be able to create a new record in the main form, after they have finished filling in the boxes in a subform by pressing the Enter key, rather than having to click the 'new record' button on the main form.

I reckon I need a 'default button' on the subform but I have no idea what this should do when clicked to create the new record...

View 1 Replies View Related

Linking Forms (and Automatically Creating New Record)

Apr 26, 2006

Please forgive me if I don't explain everything properly, I am relatively new to Access.

I have two tables with the following information:

VOLUNTEER
PK: volunteer_ID (autonumber)
name, address, school, etc

SCHOLARSHIP
PK: scholarship_ID (autonumber)
description (text)
amount (currency)
FK: volunteer_ID (number)

One scholarship can be awarded to only one volunteer.
I have a form to enter all the volunteer information. At the bottom of the form, I would like to place a button to open a new form to award a scholarship to this volunteer. I believe I need to link the forms in the following manner:

VOLUNTEER.volunteer_ID = SCHOLARSHIP.volunteer_ID

The problem is this: The forms are not linked properly because in order to assign a volunteer to a scholarship, the scholarship must already exist. So when I click the button to open the scholarship form, the scholarship form is empty and the volunteer_ID defaults to "0".

I think this could be fixed by somehow making my button create a new scholarship_ID in the scholarship form and THEN linking the volunteer_ID fields.

Does this seem like a solution? If so, how would I implement it? I have a screenshot to help. Thank you in advance for your help.

View 6 Replies View Related

Disable Subform When Creating Record In Parent

Jul 27, 2004

I'm having difficulty controlling data entry to (disabling) a subform when a new record is being added to the parent form. I can set the subform to be disabled if there is no index value in the parent form (this allows the subform to function for existing records) but then the user has to create the parent record and move off of that record and then return to it in order to add child records to the subform. This is basically a create new records/data entry problem and I'm feeling pretty stupid. There must be a way to handle this...

View 3 Replies View Related

Update Query Creating Extra Record

Jan 5, 2005

i have this problem that is bugging the crud out of me:
sql="UPDATE bedrifter SET pr=" & Request.Form("pr") & ",totalindexedpages=" & Request.Form("tip") & ",totalinboundlinks=" & Request.Form("til") & ",description='" & Request.Form("dsc") & "' WHERE created='" & Request.Form("ts") & "'"

conn.Open connStr
conn.Execute(sql)
conn.close()
Set conn = nothing

when i run this code it updates the correct record (line in my access db) but then it also adds a new line with only that info in the update query. why is it doing this? when i update using the ID instead of using the timestamp in the WHERE clause it works fine. really frustrated...

View 1 Replies View Related

Modules & VBA :: How To Use Like Statement When Creating Record Set Of Data

Dec 17, 2013

how to use the Like statement when creating a record-set of data through VBA. Before I was always able to find work-arounds but now is the time to slay this issue once-and-for-all.A person can build several sales quotes for a specific company and I am trying to find the last sales quote that was built. The function is passed a variable length string and I am trying to build a recordset of all quotes based on the variable. Here is the offending line of code:

strSQL = "SELECT * FROM Quotes WHERE Quotes.ProposalNo Like " & "*" & strProposalBase & "*" & " ORDER By Quotes.QuoteID DESC" (This yields an empty recordset)

strSQL = "SELECT * FROM Quotes WHERE Quotes.ProposalNo Like ""*" & strProposalBase & "*"" ORDER By Quotes.QuoteID DESC" (This yields an Error message stating there is an invalid column name)

strSQL = "SELECT * FROM Quotes WHERE Quotes.ProposalNo Like " & strProposalBase & "*" & " ORDER By Quotes.QuoteID DESC" (This yields an Error message stating there is incorrect syntax near the word ORDER)

I have tried different variations above and beyond these strings and get one of the three listed errors.

View 6 Replies View Related

General :: Creating Individual Calendar For Each Record

Jul 16, 2014

Not sure if it's possible but I'm trying to create individual calendar's for each staff member and client to put availability and bookings on to them. I've tried using the active x control but it's not really what I want, not sure how else to approach this as my access skills aren't that great.

View 3 Replies View Related

General :: Creating History Record From Another Table Values?

Jan 20, 2014

I have a table that deals with current data (as in member rentals of items). The normalized tables that we have been given include a rental history table. The idea is that, when the member has returned the product a history entry is made in the completed rental table.

I wish to have a button which is clicked to triggers this event. Would I program a macro to do this? In other words, would I create an event that passes those values to the relevant fields in the other table (Name, date issued, return date etc)?

View 9 Replies View Related

Forms :: Information Not Retained Within Subform When Creating A New Record?

Jan 20, 2014

I have a form and a subform.

When I click on the command button to create a New Record and then type the customer details in the Main Form and the Order Details in the Subform, the information is not retained

i.e. when I close the Form and then re-open the Form the orders details are not saved but the customer details are.

When I re-enter the order details the information is retained this time, everything seems work ok second time round!!

View 4 Replies View Related

Modules & VBA :: Error Message On Creating Duplicate Record

Jul 25, 2013

I need to be able to produce an error on a form where the user attempts to create a new user that already exists. The error needs to be produced when the save button is clicked.

See below for the existing code on my save button which exists in form, 'frmAddEditUser':

Private Sub cmdSave_Click()
If IsNull(cboManagerID) = True Then
MsgBox "Please select a manager", vbExclamation, "Details Missing!"
Me.cboManagerID.Requery

[Code] ....

Currently, if I attempt to create a user with the same Payroll ID as an existing user, my 'User details saved' message box is displayed and to the user it looks like a new record has saved successfully which isn't the case.

I need a message box to appear displaying something like "Payroll ID n already exists" where n is the 'PayrollID' of the duplicate record. (Is it possible to combine a value from a certain control and ones own custom text?)

Note: PayrollID is a combination of letters and numbers, i.e. two letters, followed by 5 numbers, e.g. JD12345.

For reference, the table/field and and control are called, '[tblUser].[PayrollID]' and 'txtPayrollID' (on 'frmAddEditUser') respectively; it is from this field and control that I want the error to be produced if the user is entering the same values which are existing in 'tblUser'.

View 10 Replies View Related

Forms :: Creating A New Record From Another Form And Passing Values?

May 20, 2014

Have a form that contains fields AssociatedProject, AssociatedRelease and then the user hits a button to create a new record and a new form opens to display this newly created record which sets the fields and also sets a field called Type. There is no issue with setting the field values and the new record is created. However, when the form opens to display the record it displays another record instead (usually the one before it). I think it could be related to the fact that the db resides on a shared drive which periodically has slow connectivity. However, I'm looking for a solution, perhaps modifying the code?

Here's the code:

Private Sub Command17_Click()
Dim strSQL As String
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim ctl As Control
Dim varItem As Variant
On Error GoTo Err_Command17_Click
Set db = CurrentDb()
Set rs = db.OpenRecordset("Tbl_Main", dbOpenDynaset, dbAppendOnly)

[code]....

View 6 Replies View Related

Forms :: Access 2010 - Creating A New Record In A Subform?

Apr 12, 2014

I am trying to create a database to manage IT assets, most of the structure is done, I'm now trying to get the details done.

The issue I am currently trying to tackle is to get a control button on one form to create a new record in the sub form that sits in the main form via another pop-up form.

So I have :

>PeripheralsViewForm - that has 4 control buttons (Edit Quantity, Edit Description,Add an Item and Exit)

>> PeripheralsSubForm - (Datasheet) which is referenced to PeripheralsQuery

The Edit Quantity and Edit Description open a separate form which allows the user to update only the quantity or description respectively (I have done it this way rather than allowing edits in the data sheet as I feel that it is too easy to hit a key incorrectly and overwrite data in the datasheet view) Both of these functions work perfectly (to my amazement) - I am using the id field in the subform to link to the pop-up form which then has unbound text input boxes, which I then write back to the subform.

e.g from edit button on click event: DoCmd.OpenForm "perquantform", , , " ID=" & Form.PeripheralsSubForm!ID and then from the pop-up form "perquantform" on the "Exit & Save" button I have :

Forms!peripheralsViewForm.PeripheralsSubForm.Form! Quantity = Me.newquant DoCmd.Close acForm, "perquantform", acSaveYes

This allows the user to select the record in the datasheet form and then click either the change quantity or description button.Also also the other reason I did it this way was because I just couldn't get the subform to requery when I had the two edit popups linked to the table or query.

The problem now is that when I click on the "Add an Item" button, it overwrites whatever record is currently selected !

The code I have is this:

From the "Add an Item" button on click action:
DoCmd.GoToRecord , Forms!peripheralsViewForm!PeripheralsSubForm.Form! , acNewRec
DoCmd.OpenForm "addperform"

And from the form "addperform" - "Save & Exit" button on click action:

Forms!peripheralsViewForm.PeripheralsSubForm.Form! PerType = Me.pertypedrop
Forms!peripheralsViewForm.PeripheralsSubForm.Form! PerMake = Me.permakedrop
Forms!peripheralsViewForm.PeripheralsSubForm.Form! PerModel = Me.newmodel
Forms!peripheralsViewForm.PeripheralsSubForm.Form! PerDescription = Me.newdescription
Forms!peripheralsViewForm.PeripheralsSubForm.Form! Quantity = Me.newquantity
DoCmd.OpenForm "PeripheralsViewForm"
DoCmd.Close acForm, "addperform"
--------------------------------------

the line "DoCmd.GoToRecord , Forms!peripheralsViewForm!PeripheralsSubForm.Form! , acNewRec" is what I have added to try to solve the overwrite issue, but when I run this it comes up with the error :

"runtime error 2498 - An expression you entered is the wrong data type for one of the arguments"

I have put this line in the "addperform" exit action and it comes up with the same sort of error.

Using Access 2010.

View 14 Replies View Related







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