New Record With Retaining Information

Oct 13, 2015

How to code this button so it creates a new record while retaining information such as a serial number. So if you pull up the item check out its past service. then you want to click a "new entry" button but you want the serial number to remain in the field.

What I got so far is:

Private Sub BtnAdd_Click()
On Error GoTo Err_BtnAdd_Click
DoCmd.GoToRecord , , acNewRec
Exit_BtnAdd_Click:
Exit Sub

Err_BtnAdd_Click:
MsgBox Err.Description
Resume Exit_BtnAdd_Click
End Sub

But obviously it erases the serial number.

The field is txtSerialNumber and the control source is SerialNumber.

View Replies


ADVERTISEMENT

Forms :: Retaining Drop Down Value For Next Record

Apr 27, 2015

After choosing a dropdown value and filing in other required fields, I click Add Record. Is there a way to retain the same value in the dropdown list assuming it will often be the SAME AS dropdown value (e.g., the same customer) of the record I just added?

View 14 Replies View Related

Record Not Retaining/storing Combo Box Selection

Mar 9, 2006

hi,

i have a form that uses combo boxes for entry, some of the combo box entries are dependent on preceding combo box selections.

i have managed to make the combo boxes present options based on the previous selections, but am finding that after i move on to another record, some of the combo box entries are not being retained or stored in the record.

It happens only on some records and sometimes when I return to it again the selections are there even though on a previous ocassion they were not.

Can anyone suggest what may be causing this?

Regards

K

View 5 Replies View Related

Modules & VBA :: Event Information - Deleting Record Creates A Blank Record

Sep 8, 2013

I have a form set to the table Client Information with a subform set to the table Event Information. Client Information has a one to many relationship to Event Information.

There is a button that deletes the current record in Client Information--also deleting the related records in Event Information--then closes the form. The code works fine but a blank record in Event Information is apparently being created before the form closes.

Here's the VBA that I'm using:

Private Sub CmdDelReturn_Click()
Dim CmdDelReturnMsg As String
CmdDelReturnMsg = MsgBox("Delete event & client then return to front?", vbYesNo + vbDefaultButton1, "Delete and Return?")

[Code] ....

It's not a big deal because the button won't be used often and I can manually go into the table to delete the blank record. But if there's a simple solution to prevent this that would be nice.

View 3 Replies View Related

Population Current Record With Information From Next Sequential Record

Apr 14, 2007

I need to write a query which populates an empty field in the current record with information from a specific field in the next sequential record. Any ideas?:confused:

View 3 Replies View Related

Me.controlsource Not Retaining Value

Dec 13, 2007

I have a unbound text box being used as a label. In the control source of the text box I have a date ie. =#12/31/2008#. I am using this date for criteria in a dsum function, so whatever date is in this field effects the data being displayed. I need to be able to have the user edit this date when necessary. I created another unbound text box and put the following code in the after update: Me.ReestDate.ControlSource = "=#" & Me.EnterReestDate & "#"
This is working as it is displaying the correct change. My problem is that the control does not retain the date. When I exit out and go back in, the original date is still there. Is there some code that will save the field after I update it? Or maybe another suggestion to do what I need.
Thanks
Gregg

View 3 Replies View Related

Repeating Information On New Record

May 25, 2007

hello,

I have a form, and I am on record "A". When clicking to add a new record "B" I want all the same information on record "A" to show on the new record "B".
How can I do this without using default?

Thanks

View 8 Replies View Related

Retaining Leading Zeros

Jun 22, 2005

I have a query and i want to join 2 fields together

eg. JOB:[Type_id] & [Number_id]

this works fine but i need to put an input mask on the field

type id is 2 letters
number id is 4 numbers (0001)

however whan the filed JOB is created all leading 0's from Number id are lost

how can i prevent this

RICKA

View 2 Replies View Related

Retaining Order Of Records

Nov 10, 2006

Hi, how do I retain the order of my records in a table in terms of when added ie

1st record id = 3456
2nd record id = 1234
3 rd record id = 2456

but when i go into the tabel it is now in order of 1234, 2456, 3456...i dont want numerical ordering!!

Cheers

Tania

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

MS Access Record-Locking Information

Mar 31, 2006

Hi,

I have a question.

Does anybody know about "MS Access Record-Locking Information"?

And, the file extension is .xxx

Only one person can open the file.

Does anybody explain to me and teach me how to make/solve it?
Or, offer the link about it to me?

I want to know that.

Thanks a lot.

View 1 Replies View Related

Moving Information From Previous Record

Oct 25, 2004

I need to be able to move 2 fields from the previous record to the next record. Does anyone know how to do this?

What I am doing is the following:

I have a table with 3 fields. I am using a form to enter the information. Two of the fields on the form will be information from the previous record. How can I bring that information forward to automatically be on the form and in the table?

View 2 Replies View Related

Moving Record Information To New Records

Dec 29, 2005

Hi, found this forum looking for an answer to this question. Hope someone can help.

I'm trying to build a database that tracks electronic components. Mostly the database tracks location movements, but also repair issues and other possible changes. I'm thinking the best way is a database that has a record for each move, and any other changes are included in each record.

My question is, is there a way I can easily have the current information be propogated over to a new record, where it could then be modified? Example: I'm looking at a record of an item that was just returned to me. I would like to click a button on the form which would create a new record, then move all currently displayed information into that record.

Thanks for any help.

View 3 Replies View Related

Retaining Text In A Click Action

Jul 6, 2006

I have two fields set up on a form, when the user double clicks in field 1, the text that was in Field 1 then moves to field 2. The issue is that the text in field 2 only retains the most recent text change - overwriting the text that was in field 2 previously. How do i make it so that every time the text moves to field 2, that it keeps a running history of the text?

View 1 Replies View Related

Merging Tables And Retaining Data

Oct 19, 2004

Newbie here,
i have two tables with 3 fields in each (code, Description and amount)
what i need to do is join these two together to show data from both tables (some of the
data in fields one and two will be identical, but the third fields in both
tables will need separate entries for each table)
the primary key would be the first field (code) ysee, the original table has been updated
by a n other, some codes and descriptions changed for others so, i would like to end up with
feild one, all codes from both tables, field two,
all descriptions matched to codes from both tables,
field three numbers matching from first table, field
four numbers matching from second table.

is this a possibility?

please help...loosing hair!

Paul

View 14 Replies View Related

I Have Two Ms Access Record Locking Information Open

Jul 19, 2006

I have some security issues going on all of sudden. I now have 2 Record locking information files on my drive. I have several users sharing the database. Any clues why this is happen?

View 2 Replies View Related

Microsoft Access Record-Locking Information

Feb 8, 2006

Hello Everyone,

I have an access file (a Form) that I put in the network and it's accessable thru a web site inside our company(intranet). I setup the database to be on shared mode so everyone can access it at the same time. The problem I'm having is that when someone open the file, access creates another file called "Microsoft Access Record-Locking Information" which still active even after users close the form and their web browser and this doesn't allow me to edit the file if I need to make changes. Is there a way to deactivate this record-locking file? The only way I found out to be able to access the file after someone used it, is having the user go into their Task Manager and delete MSACCESS.EXE from the Processes tab. Any inputs would be greatly appreciated.

Pablo

View 7 Replies View Related

Accessing Information From A Table Record Using Codes....

Jun 19, 2006

Hi all,

I've got this simple thing.. which I couldn't do and stuck for a long long time.. I have done some programming in a few languages, but not in SQL or VBA and I quite confused about programming styles that VBA and SQL accepts.

I'm currently working in Microsoft access and the thing I'm stuck on is retriving field value from a record and writing into another record on the same table.

For example the table "Table-users" looks like the following:

ID Name Year Month Date
1 Steven 1979 9 18
2 Jeremy 1977 10 22
3 Eslynn 1988 10 10

I've built a form that contains two lables (combobox), "ReplaceMe" "LoadMe" and a command button. Which end user could choose which record to load and which to replace.

I wish to copy Year, Month and Date from LoadMe into ReplaceMe without effecting the Replace me ID and Name.

The VBA, SQL code i've got looks like.
-----------------
'Command_Click is the tigger button to active the following code.
Private Sub Command37_Click()

'Below is an example of what I wanted to do field by field. However, in the real
'environment, I needed to move about 20 odd field into another object. I'm not sure
'to use Append or Update Query
Dim UpdateSQL As String
Dim text1 As String
Dim text2 As String
Dim text3 As String

'this loads the string containt-the Name of the object-into text1.
'this line works fine, arr.. other ones don't.......
text1 = Me!ReplaceMe
text2 = Me!LoadMe
'Load the month of the LoadMe.
text3 = Table![Table-users = text2].month

'Loads the SQL instruction into UpdateSQL
'Table-table is a table, containing several objects and fields.
UpdateSQL = "INSERT INTO [Table-users].text1( [Day], [year], [month] ) " & _
"SELECT Table-users.Day, Table-users.year, Table-users.month" & _
"FROM Table-users" & _
"WHERE (((Table-users.Name)='ReplaceMe'));"

DoCmd.RunSQL UpdateSQL

End Sub--------------------
Well the obvious, the above code doesn't run.
If LoadMe = Jeremy, ReplaceMe = Steven, the above code should return:

ID Name Year Month Date
1 Steven 1977 10 22
2 Jeremy 1977 10 22

Making Steve's Year, Month and Date field the same as jeremy

======================

What I think i'm confused about is when do I use [ ] ( ) ! .

Like... if I wanted to read the field value of "Date" from the object from the "Name" in combo box "LoadMe", what should I write?

ie, if the combo box "LoadMe" contains Eslynn. The end result should be 22.

Many thanks

View 2 Replies View Related

Modules & VBA :: Unable To Add Hidden Information To A Record

Mar 3, 2015

I'm trying to add hidden information to a record and need to know the best way to do it.

I have a visible table that all users enter data into using a form.

I also have a hidden table that contains 2 fields "linked Table ID" and "notes"

I have a box at the top right of my form which is white (I also have a white background so it's impossible to see).

When you click the box it changes a textbox on my form visible property from false to true.

then I plan to use a separate button that the user currently uses to save a record to store ID number and hidden textbox information in the hidden table but I'm sure how to do this.

Finally I will use a hidden query which will display all the fields from both tables using the linked Table ID from the hidden table and ID field from the non hidden table.

So i have 2 questions:

1 how do I save information the user entered into a form created from one table into a different (hidden) table

2. Is this the right approach to this problem?

View 3 Replies View Related

General :: Get ID Number And Update Record With New Information

Jul 25, 2014

I am having a problem with retrieving the information I am looking for. Basically I am checking to see if a user has selected a TRNumber from a drop down menu and if that TRNumber matches any other records in the table in that field. If it does, is that Number already associated with the user selecting it. If it is I want to get the ID number so I can simply update the record with new information. Here is what I have so far.

Code:
Dim Rs As DAO.Recordset
Dim Tech As String
Dim MsgStr As String
Dim IdMod As String
Set Rs = CurrentDb.OpenRecordset("PrepStartDateBlankQuery")

[Code] .....

View 14 Replies View Related

Retaining Foreign Key Values After Data Input

Nov 11, 2005

Hi

I want to be able to invoke a form from a main form that allows me to add, delete or amend records in a table related to the one updated by the main form.

As many details records are being updated, I want to retain the value of a couple of foreign keys (but be able to amend them if required) based on the value of the previous record.

I have looked at the Dlookup function and wonder if this is what I should be using. If it is, I am having trouble trying to understand how you could differentiate between the first invocation of the pop up form and any subsequent table entries. The way I understand this function is that to get the value of the previous record in the table you use "ID-1", but this would almost certainly lead to an error for records being updated for a new master record, or if the table happended to be empty then there would be no ID-1 record.

Any help would be greatly appreciated.

Thanks

View 3 Replies View Related

Table Not Retaining Data From Form - Access 97

Oct 28, 2004

Hi,

I'm relatively new to Access and have just created a database and am wanting the database to calculate the total of two fields and store this information in the underlying table.

Example:-

Field 1 - £10
Field 2 - £15
Field 3 - TOTAL of above - I have used the calculation =([Field 1]+[Field 2])

This works fine in my form but the total value doesn't fall through to the table. It is just blank.

I am using Access 97 and wonder if this is somehow possible. I have attached a screen shot of the properties for this field (which is called 'Total' in the underlying table).

Any assistance would be appreciated.

Thanks,
Dean.

View 1 Replies View Related

Retaining A Value Entered Throughtout The User's Session

Nov 13, 2006

I am creating a database to track a student's course load in a degree program.

When the student enteres their ID on the first form I want to retain that value so subsequent forms and views display their records, or allow new entries/updates to different tables without re-entering their ID. I'm having no luck passing the value entered into the first form's text box to other processes selected prior to closing out the database.

Thank you.

View 3 Replies View Related

Modules & VBA :: Public Boolean Variable Not Retaining Value

Oct 9, 2014

I have a backup subroutine which automatically triggers when the front-end is closed down (it just takes the back-end, makes a copy and compacts it).It's driven off a hidden form which I use to track who is connected to the BE at any given time. This form is opened as part of the AutoExec when the FE is opened and writes some basic user info to a table. When the form is closed, it updates the table and fires the backup process before quitting Access.

Part of that user tracking process checks to see if the same user is already connected - either elsewhere (i.e. on a different machine) or on the same machine (i.e. opening a second instance of the same FE) - which is undesirable (and, frankly, unlikely, but not impossible) A brief prompt appears to explain that they can only be connected once, at which point the application is quit (to enforce the rule) This also works fine.

I would add a public boolean variable, set it to True by default, then switch it to False if the same user is already logged on before quitting Access.Trouble is, the variable doesn't seem to be holding its value? Here is the Load event for the tracking form :

Code:
Private Sub Form_Load()

On Error GoTo ErrorHandler

Dim dbs As Database
Dim rst As Recordset
Dim strSQL As String
Call InterfaceInitialise
blnPerformBackup = True

[code]...

For some reason, blnPerformBackup is False every time, even though I set it to True at the very start of the Load event (and it is a Public variable, defined in a separate module where I store all my Public constants and variables)

why it is not retaining its value from the Load event? I've checked and it does get set to True - and when I debug, it remains True - but at runtime it reverts back to False by the time it reaches the decision whether to backup or not?

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

Forms :: How To Transfer Information From Current Record Into A Subform

May 8, 2013

I have a form which contains a subform. On this subform, the user will enter several lines of container ID numbers. If one of these containers has errors, they check a yes/no box and a pop up form opens for them to enter the details of the errors.

I want two fields that are populated on the subform to transfer information to the corresponding two fields on the pop up form. This works when only one container ID has been added to the subform. However, when there are multiple containers in the subform and the container with the errors happens to be the second or third record on the subform, the pop up form always transfers the information from the first record to those fields.

I also have the subform requerying when the check box is checked so that the information saves to the table and the focus does stay on the correct record but the pop up form still opens with the wrong information.

how to transfer the information from the record that the user is currently on?

View 4 Replies View Related







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