One-time Populate Two Fields With "same" Data

Aug 10, 2006

I have a Company form, a typical form with fields for capturing company names, address, phone etc.

The two fields I have an issue with are:
CompanyName: a regular text field for full company name
ShortName: a regular text field for same data as above but with spaces/blanks removed (to be used as a 'quicksearch' field)

I want the ShortName field to be automatically filled when the CompanyName is entered (on a new record), but allow the ShortName field to be overwritten by the operator.

I would then like to "lock" the ShortName field, such that any subsequent amendment (accidental or otherwise) to the CompanyName will NOT automatically update the ShortName field, but there will still be occasions when legitimate changes to the ShortName field will be required.

Removing the spaces is not a problem; I have a problem determining how to control the automatic updating and subsequent updating/prevention of updating.

Suggestions please.

regards
AlanM

View Replies


ADVERTISEMENT

Forms :: Using VBA To Populate Date / Time Fields On Subform

Jan 10, 2015

I have a form that contains a subform. On the main form, there are 3 fields: [IncidentNumber], [OpenDate] and [OpenTime]. The subform, [CtrlLog Detail] , contains the log entry details for each incident number. Every incident number can have many log entries. Two of the fields on the subform are [EntryDate] and [EntryTime]. The fields work correctly and the forms are fine.The issue Im having is when a new incident number is created the [OpenDate], [OpenTime] and [EntryDate], [EntryTime] MUST be equal because of some filter queries for statistics. Right now the user must physically type in the date/times in these 4 fields when they create a new incident number, which means I'm having lots of data entry errors.

Using default value on either [EntryDate] or [EntryTime] on the subform doesnt work because it doesnt create a primary key for the underlying table and the subform will not allow any other entry (due to some other linked values) until that PK is created. The forms are based on tables linked by [Activity_ID] as the primary key. I want to create some VBA code to see that if the Incident number is a new number (meaning the user must type in the new incident number creating the primary key for [Activity_ID]), that access will automatically populate the [EntryDate], [EntryTime] fields to match the [OpenDate], [OpenTime] fields on the main form. The user will manually populate the [OpenDate], [OpenTime].

If the number is an existing number (and the user is simply adding a log entry to the incident number) then I want [EntryDate], on the subform to default to the system date/time ([EntryTime] should remain blank for user entry) while keeping [OpenDate], [OpenTime] unchanged. When the [EntryDate], [EntryTime] fields are populated on creation of a new incident number, I want the PK for the underlying table ([Log_ID]) to be generated.

View 2 Replies View Related

Forms :: Auto-populate Current Date And Time When Other Fields Completed

Feb 24, 2015

I have a table called Neutron2015. I want the current date and time to complete when entries are made in two other fields. So I am looking for this date and time to populate in EXLStart when an entry is made in Processed By, and also the current date and time to appear in EXLEnd when an entry is made in Completed By with the bold word being the field names.

Is this possible, and how difficult is it?

View 2 Replies View Related

Populate Fields Using Data From Different Tables?

Feb 6, 2012

need to create a database for work. there would be a way to select an id based on a previous table and have parts of it populate in this new table.

For example:

Table A - Webinars (Webinar ID, Webinar Title and Client)
Table B - Sessions (Session ID, Date, Webinar Title, Time, Facilitator, Session Occurred, Reason, Conference Call) [Webinar Title I used a look up field and just select the corresponding Webinar Title and it works nicely]
Table C - Users (User ID, Status, Prefix, Last Name, First Name, Email Address, Component, Role and State)
Table D - Registrants (User ID, Session Date, Webinar Title, Attended).

So in Table D I would like to add Role and Component, so when I select User ID #1 the Role and Component Field populate with the info based on Table C.

View 3 Replies View Related

Forms :: Auto Populate Fields And Save Data To Table

Dec 16, 2013

In my UpdateForm I have 3 fields. PartNumber, Description and SerialNumber. I use 2 tables for these. My MainTable and PartsList Table.

In my PartsList table I have the list of PartNumber in Column (0) and Description in column (1).

In my MainTable I have 4 fields: TransactionID (autoNumber), PartNumber(text), Description(text) and SerialNumber (text).

Now, In my UpdateForm I want the user to just select the PartNumber with a combo box (that also show the "Description" (I created this using the combo box wizard)). But I want to auto populate the field in my "Description" text box every time the user will enter new record and will also update my MainTable with all the values they entered in my UpdateForm.

I tried this codes in the after update of PartNumber combo box (properties):

Description = Partnumber.Column(1)

I tried also:

me.Description.value=me.PartNumber.column(1)

both codes unsuccessful.

View 3 Replies View Related

Reports :: Auto Populate Date And Time Every Time Form Is Updated

Nov 8, 2013

I have a database that stores information for lab testing. Each time a tech does a "step" in the test process he logs it in the table, using an input form. There are different categories, for example preparation, testing, analysis, etc, and each of those steps take time. I have the form autopopulate the date and time with NOW() evertime the form is updated. What i want to do is calculate the time it takes to do each in days. I can easily get how many days it was from now since they logged the test, =NOW()-TestDateTime. What I want to do is get the number of days it took to do each step, ie the number of days between each event. Is there a way to do this?

View 3 Replies View Related

Validating Data In 2 Fields At Same Time

Apr 4, 2005

I have a form that asks 2 questions. Date and Account. I need to check a table to see if the combination of both date and account have not been used. Date is normally today, can be yesterday. Account has a drop down menu with 6 choices. If both the date and account have been used then there should be an error shown to that effect. If not used, then proceed on to the next form for data entry.

Can this be done? And how?

View 1 Replies View Related

Tables :: Pivot Analysis - All Data Fields Are Blank Every Time On Opening Database

Sep 5, 2014

I work on a pre-created Access database, and the other day I was working on it, and was trying to export something to Excel to sort it and do some Pivot analysis.

Anyway, I must have pressed something, because now every time I open the database, rather than saying "record 1 of 20463" and showing the data from record 1, it shows "record 1 of 1" and all the data fields are blank. If I go to "Records" and "Show All Records" they'll all come up, but I don't want to have to do that every time, and as I import and export all the time, I'm worried that the next time I try it it'll mess up the years of data I have.

View 10 Replies View Related

Any Way To Populate Fields In Access From Fields In Excel?

Jun 26, 2012

Is there a way to populate fields in Access from fields in Excel in Office 2010? If so, what do I need to do?

View 6 Replies View Related

Forms :: Auto-populate Field With Date / Time In Future?

Dec 15, 2014

I'm currently building my first database for a research project. When we enroll a participant, we need to have an enrollment date/time as well as an activation date/time (and they are not allowed to be the same because, rules). I was able to figure out how to auto-populate the current date/time when we've marked a person as enrolled. What I'm wondering is if it is also possible to auto-populate another field with the date/time, ten minutes in the future?

View 3 Replies View Related

Populate Combo Box From Values Through Query And Hard Coded Value At Same Time

Jun 18, 2015

Currently I have a combo box in my access 2007 application which is drawing its value through a table using a SQL Query. I would also like it to show up a hard coded value in addition to the current list.

View 3 Replies View Related

General :: Populate List Box With Event After Update In Combo Box - Run Time Error 13

Sep 9, 2013

I am trying to populate a list box with an event after update in a combo box. I can get the formula to work using 2 criteria, the problem is i nee to add a third criteria. When I try to add it I get the run-time 13 error.

Here is the code I am trying to use:

Private Sub cboStatusRFQ_AfterUpdate()
Me.cboSupplier.RowSource = "SELECT DISTINCT [Consolidated_Master_Req_Pool.RFQ Contact] " & _
"FROM Consolidated_Master_Req_Pool " & _
"WHERE consolidated_master_req_pool.Complete = FALSE AND [Consolidated_Master_Req_Pool.RFQ Supplier] = '" & Nz(cboStatusRFQ.Value) & "'" And "[cosolidated_master_req_pool.Status] = '" & "[SUPPLIER_RFQ FOLLOW-UP]" & "'" & _
"ORDER BY [Consolidated_Master_Req_Pool.RFQ Contact];"
Me.cboSupplier = Null
End Sub

View 2 Replies View Related

Forms :: Rich Text Box - Dynamically Populate Control With Embedded Objects At Run Time

Mar 29, 2015

From a info sheet on RTB Using the Add, Clear, and Remove methods, you can dynamically populate the control with embedded objects at run time. Can those 'embedded objects' be controls, e.g. list boxes, labels etc ?

View 3 Replies View Related

Forms :: Add Time Value To Time Data Type SQL Server Field In Access

May 6, 2015

how to be able to enter time in access form the same way as if would be an access table (1p = 1:00 PM; 1.25 = 1:25 AM etc)

View 1 Replies View Related

Changing Fields To Must Populate

May 3, 2006

Hi Everyone

I need to change a fields properties on a form depending on another fields data.

i.e. If a user ticks a Yes/No box saying they've done something they must also complete the date they did it. I can't set the date field in the table to be 'Required' as if ther is no tick then it doesn't need to be.

Cheers

D

View 4 Replies View Related

Add 3 Record Fields To Populate A 4th?

Feb 25, 2007

I have a table where there each record has 3 fields i need to add together for a fourth both in my form and the table and i need the data in that field to be uneditable. how might I accomplish this? In the control source i tried:

=[LINE 1 QUANTITY]+[LINE 2 QUANTITY]+[LINE 3 QUANTITY]

but it displays

#Name?

View 4 Replies View Related

Populate 3 Fields From One Combo Box

Mar 27, 2006

I have a combo box on a form that shows 3 columbs from tblparts in the drop down, I wish to select one row from the drop down, that will enter the selected data in three fields on the form.

For example my form has three fields "part code", "Description", "cost".

Part Code = combo box
Description = Text Box
Cost = Text box

I want to select the data from the combo drop down to populate all three boxes.

Can sombody please help, as I have been stuck on this all afternoon. Cheers

View 2 Replies View Related

Populate Fields Of Last Record

Nov 3, 2011

I have a form( frmDate) and a subform (frmChecks)-is off a query Checksquery . On the from is located only a list box lsatDate with rowsource to cross query Date . It is only display the dates. The sub form in designated to record numbers of checks, their first and last number and total amount of checks that have been requested to be issued.. It has 8 txt boxes : txtDate, txtChecksNumbers, txtSheetsNumbers, txtStartChecksNumber , txtEnd Checks Number, txtTotalAmount, txtBegginigofWeek and txtEndofweek. I have forgotten to mention that form and sub form have linkchildfiled-lstDate, and linkMasterfiled-txtDate so user can scroll date in list box and retrieve the records for past dates. I would like to program in form upload event if I can when a user opens form three things I need to be happened:

1) the txtStartCheksNumber would be populated of the last record txtEndChecksNumber,
2) the txtDate would be filled as date today,
3) and txtBeggininofweek would be populated off last record txtEndofweek with adding one day .

I have programmed txtSheetsNumbers in record source as =Round((LTrim([ChecksNumbers])/3)) b/c there three checks on one sheets and also programmed txtChecksNumbers as =Round(LTrim(([StartChecksNumber]+[ChecksNumbers]))) so that this field is populate adding starting checks number and checks numbers. I need this b/c many users use this form to print checks and every check must be accounted so filling the form correctly is very imperative and uploading these records would be very useful since many mistakes are made b/c users go to the last record to retire info. Users dont see the queries; they see only form and sub form once they request checks for printing.

View 3 Replies View Related

Using A Query To Populate Fields In A Form??

Feb 7, 2006

I have very minimal knowledge of MS Access and I have to create a database to input, update and display project information. How do I write a query to populate fields on a form, from either a single table or multiple tables?

View 3 Replies View Related

Using A Table To Populate 3 Form Fields

Mar 17, 2006

Hi

I have a form with 3 combo boxes part No, Description, Cost. I have created a table with this information in I want to be able to select the information from either one of the three drop down boxes and the other two to automatically collect the information from the other colums of the table. Can anyone help please?

View 2 Replies View Related

Populate Form Fields On Open

Aug 7, 2006

Hi all,

I'm sure this must be a well used function by many access users but I can't find anything about it online at all - please help!

I want to open a subform "AddReservation" and populate three fields with data taken from the relevant record in the main form. So in the btnOpenAddReservation_Click event to open the subform I set global variables, then in the form_open event I have this:

Private Sub Form_Open(Cancel As Integer)

Me.CatID = stLinkCatID
Me.CatName = stLinkCatName
Me.OwnerID = stLinkOwnerID

End Sub

But I get the error 2448 'Can't assign a value to this object'.

However if I put the same three lines into the start of the subform's btnARSave_Click event it works fine:

Private Sub btnARSave_Click()
On Error GoTo Err_btnARSave_Click

Dim stDocName As String
Dim stDocName2 As String
stDocName = "OwnersAndCats"
stDocName2 = "AddReservation"

Me.CatID = stLinkCatID
Me.CatName = stLinkCatName
Me.OwnerID = stLinkOwnerID

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

YesNo = MsgBox("This reservation has been added successfully, do you want to add another?", vbYesNo + vbQuestion, "Add More Reservations?")
Select Case YesNo
Case vbYes
DoCmd.GoToRecord , , acNext
Case vbNo
DoCmd.Close acForm, stDocName2
DoCmd.Close acForm, stDocName
DoCmd.OpenForm stDocName
DoCmd.GoToRecord , , acGoTo, stRecordNo
End Select

Exit_btnARSave_Click:
Exit Sub

Err_btnARSave_Click:
MsgBox Err.Description
Resume Exit_btnARSave_Click

End Sub

What am I doing wrong? Why can't I populate the fields on open?

Many thanks
PT

View 1 Replies View Related

Auto Populate Text Fields

Nov 15, 2004

I am trying to auto populate a text box when i click on the button to add a new record. This is the code for the addnewsequence button.

Private Sub addnewsequence_Click()
On Error GoTo Err_addnewsequence_Click


DoCmd.GoToRecord , , acNewRec

Exit_addnewsequence_Click:
Exit Sub

Err_addnewsequence_Click:
MsgBox Err.Description
Resume Exit_addnewsequence_Click

End Sub


In this form is a text box called degree name that is link from the table degree. It autopopulates with the degree upon the sequence form first opening button clears the text box when i click add new sequence


any help greatly appreciated...
Thank you

View 2 Replies View Related

Populate Form Fields From A Combo

Jul 30, 2005

Trying to update fields (bound) on a form (built using the wizard) from value selected in a combo box. I can get this to work with unbound text boxes using an After Update event handler and a code query along the lines of:

Me!TxtJobCode1 = Me!CboJobDesc.Column(1)

But this doesn't work where the form field is bound to a table.

So qu is - how do I achieve the same result using table fields instead of text boxes?

I could use text boxes but not sure then how I can save that data as a record in the table if it is not bound to fields.

Any help appreciated

Andy

View 1 Replies View Related

Modules & VBA :: Auto Populate Fields

Aug 17, 2015

In a form, I have a comboBox with 3 columns.I update the field and with this piece of code, I update two more fields based on this comboBox data/columns.

Code:
Me.EUR.Value = Me.Combo37.Column(2)
Me.USD.Value = Me.Combo37.Column(3)

I wonder if I can update fields which are not parts of a combo.For example, suppose I have a form with two fields, DATE and USD, Once I update the DATE field, this event, auto populates the USD exchange rate field.

View 3 Replies View Related

Auto Populate Fields On Current Form

Jul 16, 2006

Hi. I tried to find out if this issue was already posted, but did not find. If anyone can help me, I am trying to auto populate two fields on a subform. The field I want to populate is the description of a role. So if the user selects the role name from the combo box, the description field will automatically update. Thanks.

View 14 Replies View Related

Code To Populate Multiple Fields In One Sub Form From Another

Sep 6, 2006

I am looking to add multiple lines of record to a sub-form via a module activated from another linked sub-form.
As an example of what I want to do:
On identifying a particular type of vehicle servicing (e.g. 6000 mile service, 12000 mile service) on a service event sub-form of a vehicle form, I want to enter a list of required parts (e.g. oil filter, oil, etc) on another sub-form called "parts", that I can then edit before recording in an underlying table.
Can anyone help.
Thanks
Steve
:confused:

View 1 Replies View Related







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