Getting A Textbox To Populate Based On Another Textbox
Mar 18, 2005
Dear All:
I have created a form using access 2000. So far, this form already has data and dates in a combox in this format: mm/dd/yyyy.
In the AfterUpdate of the date combobox, I did this:
If graduation_date = #2/1/2004# then
Text_Graduation_date = "dated this first day of february two thousand four."
End If
End Sub
In addition, I have defined many other dates as well using the code above. It works well when I choose the date form the combobox, the other textbox populates, but there are so many more dates in the combo!
Is there a way to auto-populate the textbox with the appropriate text as I scroll through the form?
Thanks,
Dion
View Replies
ADVERTISEMENT
Jan 19, 2005
Heeelo all:
I have a from based on a query. This form has a textbox called CUM_GPA which contains numbers in this format: x.xxx
In the After_update of CUM_GPA is this code:
Private Sub CUM_GPA_AfterUpdate()
If Division = "GRADUATE" Then
Honors2 = ""
ElseIf Division = "UNDERGRADUATE" And CUM_GPA < 3.2 Then
Honors2 = ""
ElseIf CUM_GPA >= 3.2 And CUM_GPA < 3.5 Then
Honors2 = "*"
ElseIf CUM_GPA >= 3.5 And CUM_GPA < 3.8 Then
Honors2 = "**"
ElseIf CUM_GPA >= 3.8 Then
Honors2 = "***"
End If
If Division = "GRADUATE" And School = "SCHOOL OF EDUCATION" And CUM_GPA >= 3.7 Then
Honors2 = "+"
End If
end sub
The textbox called Honors2 returns nothing. Any help is greatly appreciated.
Regards,
Dee
View 1 Replies
View Related
Mar 3, 2014
Code:
Private Sub Check253_AfterUpdate()
If Me.Check253 = -1 Then
Me.Text254 = DLookup("[Lot]", "[tblAutoGen]", "[Inuse] = -1")
Me.Text256 = DLookup("[Exp]", "[tblAutoGen]", "[Inuse] = -1")
Me.Text258 = DLookup("[Lot]", "[tblEthanol]", "[Inuse] = -1")
[Code] ....
I am using the code above on my form and it seems to be working. My question is there a way to populate a textbox (Text255) based off a login?
For example, lets say JSmith is loged in to the computer. Is there a way that JS could populate Text255? If then say JCarter is logged on, the JC populates Text255.
View 1 Replies
View Related
May 24, 2013
I am fairly new to Access and trying to populate a text box based on whether other textboxes throughout the form contain a date or are null, so as I update the progress of work the textbox that I have located in the header will indicate the status of work flow, this is what I thought might work but I seem to be doing something wrong.
Code:
Private Sub Form_AfterUpdate()
Status = IIf([Date_Raised] Is Null, "New", "")
Status = IIf([Date_Raised] Is Not Null, "Open", "")
Status = IIf([Approved_Date] Is Not Null, "Approved", "")
Status = IIf([Actioned_Date] Is Not Null, "Actioned", "")
Status = IIf([Tested_Date] Is Not Null, "Tested", "")
Status = IIf([Closed_Date] Is Not Null, "Closed", "")
End Sub
View 2 Replies
View Related
Oct 20, 2014
I have a textbox on a report that I wish to populate based on the value that is in another textbox/field on the report, and I thought DLookup was the way to go - however, I cannot seem to get it to work.
I have a table (ComplaintsResponses) that has two fields, both text
[ShortDescription]
[ResponseText]
The text from [ShortDescription] is saved in a field on another table that contains all the other relevant information that is used in the report, and whilst this short description is mostly fine, I have one report where I need the data from the larger [ResponseText] field.
I have tried the following code:
Code:
=DLookUp("[ResponseText]","[ComplaintsResponses]","[ShortDescription='" & [Reports]![PublicComplaintsArea]![txtSAPCRMResponse] & "'")
and
Code:
=DLookUp("[ResponseText]","[ComplaintsResponses]","[ShortDescription='" & [SAPCRMResponse] & "'")
Both of which return a #Error in the text box.
The field that contains the text that is used for the lookup is SAPCRMResponse, and the textbox on the report itself is called txtSAPCRMResponse.
View 2 Replies
View Related
Aug 3, 2005
Dear All:
I have created a form with various textboxes. In one unbound textbox called Graduation_date, I input information and this is reflected in another bound textbox called text762.
However, as I scroll through the form, the information that is to be reflected in textbox 762 disappears.
Any ideas on how to apply the information entered in Graduation_date textbox to all?
Regards,
Dion
View 2 Replies
View Related
Apr 27, 2012
This is what I have. What I need is to populate in my form PartNo with the PartNo from tblfbompart and have it populate PartDesc from tblbompart and have it place the information into tblMadeToStockParts PartNo, & PartDesc. Also choose Model from tblModel using a combo box and placing ModelID in tblMadeToStockParts.
tblMadeToStockParts
MTSID
PartNo
PartDesc
Model
Memo
Attachment
tblfbompart
fbompartID
PartNo
PartDesc
Category
frmMadeToStockParts
MTSID
PartNo
PartDesc
Model
Memo
Attachment
fbompartID
ModelID
tblModel
ModelID
Model
View 2 Replies
View Related
Jun 6, 2007
Dear All:
I have an access database with ID numbers(9-digits), names and a textbox titled "graduated".
I have an external excel file with ID numbers and and a column called Yes/No. Some of the ID numbers are already in the access database.
Can I do an import process and if the ID numbers match, the textbox called "graduated" will automatically populate with the word Yes or No?
Any ideas on how to get going?
Many thanks,
Dee
View 2 Replies
View Related
Feb 11, 2014
I have a table filled with company contacts and form with a combo box containing the contacts names.
When a contact is selected I want it to show their Telephone, Mobile and email address in text boxes below. But it only shows the telephone number and the other two fields stay blank.
what I'm doing wrong ?
I have this code assigned to the combobox:
Code:
Private Sub MainContact_Change()
Me.Text169 = Me.MainContact.Column(3)
Me.Text167 = Me.MainContact.Column(2)
Me.Text177 = Me.MainContact.Column(1)
End Sub
And this is the row source:
Code:
SELECT tbl_Contacts.Salutation & " " & tbl_Contacts.ContactForename & " " & tbl_Contacts.ContactSurname AS MainContact, tbl_Contacts.ContactTelephone, tbl_Contacts.ContactMobile, tbl_Contacts.ContactEmail
FROM tbl_Contacts
WHERE (((tbl_Contacts.ID_Company)=[tbl_CompanyBookings].[ID_Company]));
View 4 Replies
View Related
Jun 27, 2012
I have a calendar (calendar1) from which i want to populate a textbox (appt1) when i select the date on the calendar but im having problem with the code;
I tried putting it against the on updated event of the calendar as below, but not sure how far off i am:
Private Sub calendar1_Updated()
Dim myDate As NewDate
myDate = calendar1.SelectedDate
appt1.Text = myDate
End Sub
View 14 Replies
View Related
Nov 13, 2012
I'm trying to populate a form textbox which is unbound.
I have table with a list of peoples login names and a query filtering these names once a user logs in. If the GetUserName() matches one of the names in the table then user is authorised. this part seems to be working fine. User not on the GetUserName() list the filter says blank ie Not Authorized.
How to take this confirmed user name and place it into a textbox on a form?
Table name: [tblUserNames] with [IngEmpID] & [UserName]
Query Name: [qryUserNames] with a Criteria GetUserName()
View 7 Replies
View Related
Oct 1, 2013
I'm trying to do the following.
I have a text box named Last_Check on a form.
On that form load I want to use the following SQL statement to populate that text box.
SELECT TOP 1 tbl_QA_Check_Sheets.Machine, tbl_QA_Check_Sheets.The_Date, tbl_QA_Check_Sheets.Time
FROM tbl_QA_Check_Sheets
ORDER BY tbl_QA_Check_Sheets.ID DESC;
can't get it to work.
View 11 Replies
View Related
Aug 9, 2005
Dear All:
I have created a form to hold students names, ID numbers, dates, etc. On this form I have a combobox that lists various school names only. From this combobox, I wish to select a school, then the address on the school selected appears in textbox/memo field.
Can anyone point me in the right direction?
Many thanks,
Dion
View 5 Replies
View Related
Apr 17, 2015
How to update unbound textbox on main form from unbound textbox in subform afterupdate.
that is when amount paid is updated it automatically updates total paid, balance etc.
View 2 Replies
View Related
Jul 18, 2005
I've designed a data entry form based on a table. I use a few combo boxes, (linked via SQL statements for their row/source) to fill most of the fields in the table.
What I want to do is populate one textbox on the form with the contents of a field in one of the combo box's row/source tables. The field I want isn't shown in the combo box.
Basically, what I want is that when I choose a PART NUMBER from a combo box, I want the OEM_ID from the same table to jump into the textbox below it.
I think I may have tied myself in knots though to the point where what I want can't be done. Any ideas? I know this is probably going to take a couple of goes at explaining. :P
View 11 Replies
View Related
Jul 17, 2013
How to automatically populate the bound text box with data from a table for a specific entry. This is the code I wrote
Private Sub ListBox_DblClick(Cancel As Integer)
Dim ListBoxSel As String
ListBoxSel = Me.ListBox.Value
Call proc_Update_TxtBoxes(Me.ListBox.Value)
DoCmd.Close
[Code] ....
View 3 Replies
View Related
Jun 19, 2013
I would like to create a combobox on a form in which a user has three selections: negative, positive, other.
If negative is chosen a textbox auto-populates with "none detected".
If positive is chosen the text box populates with "positive" and
If other is selected the text box populates with "unspecified".
View 2 Replies
View Related
Sep 19, 2014
I am looking to have a combobox on a unbound form to select a product code (this i can do). However I want a textbox to auto populate with the description as well - both in the same table tblproducts - product_id, pcode, pdesc....
View 4 Replies
View Related
Apr 1, 2013
Got a bit stuck in a database. I have a form based on a query. On the form I have 4 comboboxes.
The combo boxes filter eachother without a problem (based on custom select query)
Now I want after the fourth combobox value is selected, I want to populate a text field with a value from a different column from the master query (after the 4 selections only 1 value should be possible)
Master query contains 5 columns:
- group
- type
- job
- insurance
- charge
combo1 selects group (and filters records)
combo2 selects type (from remaining records and filters again)
combo3 selects job (from remaining records and filters again)
combo4 selects insurance (from remaining records and filters again)
Combo4 is based on following query:
-column1
Insurance
Total=Group by
Show=yes
-column2
Job
Total=Where
show=no
Criteria [forms]![name].[combo]
This works great and the dropbox only shows 1 OF EACH DIFFERENT record
If I add a text box and want to see the "charge" value, that I thought I could use the ME.text-code. But in order to do this, I have to add the charge column into the query of Combo4.
If I do this, the dropbox for insurance gives me multiple values that are the same. Is there any way to make this work?
View 1 Replies
View Related
Jun 14, 2012
I have a form with a textbox which when users enter a unique number(barcode) I want to run a query which pics up the barcode number, checks against the product id and fills the subform with the name of the product and price.
The basic details of the product table is like:
product id (Autonumber)
prdoduct name (text)
price
barcodeId (number)
The subform where i want the result to go is the order details fields product name and price.
I am trying to figure out how to do this but my mind keeps going blank, its been a long while since i used ms access.
View 7 Replies
View Related
Oct 14, 2013
I have started converting our Access 2003 to Access 2010 applications. In the past we have used the Calendar to pick a date to place in a textbox. I noticed that this feature will not work in Access 2010.
So I looked around and saw several references to using the calendar pick feature to a textbox...but without success.
How to have a textbox with a calendar icon next to it to populate the chosen date in the textbox?
View 2 Replies
View Related
Jul 27, 2015
In the past a Teacher would manually create a Form (Student Form) containing Student information, (Name, Gender, Birthdate, Homegroup) as well as additional issues on the student. This would all be saved into a table.
I would like to change this manual process of typing in individually to each text box, therefore, I have been able to run a report from a external program that obtains (Name, Gender, Birthdate, Homegroup). This saves as CSV and I am able to import into a separate table within the database.
This works no problem.
What I have set-up is a form that contains a listbox this contains the Student name and Homegroup from the imported table contents. Again this works fine.
What i would like to do is when a student is selected from the listbox and dbl clicked on, how can i make information (Name, Gender, Birthdate, Homegroup) populate the textboxes in the Student form that the teacher previously used? could this be an update query where the imported table information will then go into the Student form? If so, how can I tell the dbl click of highlighted name is the data i want to populate?
View 1 Replies
View Related
Nov 13, 2012
I am populating a table using combo boxes in a continuous form. The box box alone works fine without any issue of repeated data. But as you know obviously the combo box only populates data in a single column of the table, in which case mine is the LASTNAME; so now I am attempting to populate a unbound textbox with the FIRSTNAME side-by-side with the combo box for the same record.
In the After Update event of the cboLASTNAME:
Code:
Me.txtFIRSTNAME = Me.cboLASTNAME.Column(3)
However, after updating the the combo the textbox data is repeated.
Is there a possible solution to this?
View 2 Replies
View Related
Aug 30, 2013
I am new to access and have been staring at the same Run-time error for 3 days (pathetic I know). I cannot for the life of me figure out why it does not like my Dlookup. Esentially, I want and After Update event in my combo box to populate a Rich text textbox in my form. After reading DLookup is the easiest way to make this happen. Here is my code:
Me.emailbody.Value = DLookup("[Escalation_1]", "Status_Emails", "Status_Emails.Status =" & (cboStatus.Value))
My error reads: "Syntax error (missing operator) in query expression 'Status_Emails.Status = LOCATION NEED MORE INFO'.
LOCATION NEED MORE INFO is the value in my criteria cbostatus.value.
View 4 Replies
View Related
Jun 23, 2015
I have a form with a text box where the user enters a date and then clicks a button titled "Add." I've added an on-click event to the Add button that runs an append query that adds several records to a table [tblTracking]. I have a field in tblTracking called EndDate. I want the date that's entered into the text box by the user to be populated into all the new records added to the tblTracking when the append query is run. Currently, all fields in tblTracking are populated when the append query is run, except the EndDate field.
Is this possible? If so, how?
I've experimented with adding a separate on-click event that adds a record to a separate table containing only the date entered in the textbox and an auto-populated ID field. I thought there might be a way to utilize the ID field to pull the associated EndDate into the Tracking table, but I can't figure that out, either, since I don't know how to tell it to look at the date field in the last record of the table. That sounds unsafe anyway.
View 3 Replies
View Related
Aug 28, 2013
I am trying to populate a textbox from a field in a table based on clicking on a item in a listbox. User clicks a name from the Client table in the client field, and the date that is stored in the orderDate in the same row. I want the text11 textbox to show that date.
View 9 Replies
View Related