Combo Box Value To Automatically Put Value From Different Variable Into Text Field

Mar 19, 2005

I have requested this before but the example given did not fit my situation and I had a heck of a time trying to adapt the example given to me so I will step by step describe what I need. thanks...


Can someone show me how to do the following:

1) Take a combo box that looks up a table that has 2 variables (Var1 and Var2).

2) Depending on the value chosen in the combobox (Var1) then a text field will automatically have the value (Var2) appear.

3) This information from combo box and text field will then be stored in a separate table that is linked to the form.

__________________________________________________ _____________

Also:

Is there a way to extend this example further by adding another combo box that takes the result from the first combo box to filter in values for the second combo box which will then automatically populate a text box which would then be stored in a separate table.

__________________________________________________ _____________

Someone kind of showed me before but they used unbound variables and this confused me as the combobox was unbound but how is that information stored into my table?

Pardon me for my redundancy but this is frustrating me to no end and I unfortunately have a deadline of today!!!! :(

I think it is the row source thing that confuses me. I take row source to mean where the data is stored. But where do you identify where to obtain the data to then store in your "inputed" table?

View Replies


ADVERTISEMENT

Automatically Change Combo Box Value Trigger By Text Box

May 9, 2006

Hello,
This is the first time I am join this web & forum. My name is Angie.
I have face some problem for Ms Access. I would like combo box to be auto change when date due. Eg: combo box name: Status. Inside have info such as Expired, Active, Ignore. This info will base on the text box name txtenddate. When the date is due, (eg:today:09 May 06), combo box will auto change the status from Active to Expired.

Any VB code can be used. Thanks.

Hope to heard from you soon.

Regards,
Angie

View 1 Replies View Related

Move Text From One Field To Another Automatically

Jun 28, 2006

Hi, I have a form set up, among other fields in the form is a Weekly update
free form field. I have another field called Historical Weekly updates. What
I want to happen is that when a user clicks in the Weekly updae field, the
text that is in there should pop down to the Historical field and have the
date of the move post next to the text in the historical field. I have no idea if this is a click action, a macro, or if it's even possible.Any help would be greatly appreciated!!


Thanks!!!

View 5 Replies View Related

Forms :: Select From Combo Box During Data Entry And Automatically Update Field

Mar 13, 2013

I have one field AccountName in customer table and another field AccountID.

In my form I would like to select from the combo box AccountName during data entry and then have the AccountID automatically update in the Account ID field.

View 2 Replies View Related

How To Automatically Set A Variable To The System Date

Mar 18, 2006

i have a date variable that i wish to be automatically set to the system date for each new record. is this possible and if so how. Many thanks.

View 6 Replies View Related

Reports :: Subform Field Linker Error - Obj Variable Or With Block Variable Not Set

Apr 16, 2013

I am creating a 2 level report to confirm an order. Main report already created, runs successfully called as subform/subreport under "OrderDetails" form. Linked to master using Order.ID. There are two versions of the confirmation report that have different layouts for different program types.

The hangup comes when I try to add a "Class Dates" subreport. It lists dates of individual classes and Skip dates. I have created the subreport as "srClassDates". When I add it to the main report, it lists the records. However, when I try to link it to the Main report, an error message box appears with the "object variable or With block variable not set".

I have tried rebuilding both the main and subreports, rebuilt the query, have not found anything that changes the result.

Linker has been working successfully on other subforms. Report with groupings works fine, but I need data from 2 tables both linked to order.id.

View 2 Replies View Related

Modules & VBA :: Expanding Treeview Automatically When Node Matches A String Variable From A Table

Jul 14, 2014

I'd like to expand me tree view automatically when a node matches a string variable from a table. In other words, when a node in a tree matches the given name (variable), the tree will expand all the way down to that name. I guess I need to use "For each node" and when the node and variable match, the tree structure will show up.

I have come up with something like this:

Code:
For Each nd In Me.tree.Nodes
If nd = level1 Then
nd.Child.EnsureVisible
Exit For
End If
Next nd
Me.tree.SetFocus

But this only shows the first level of my tree ( btw. I have a 3 level tree). I get lost inside the FOR when I want to make use of another two variables - level2 and level 3

View 1 Replies View Related

Searching Combo Box For Text Field

May 25, 2005

:mad: I have a combo box which is being used for surname searching. It displays surnames in the first column and first names in the second column. I would like the user to be able to type or select a surname from the dropdown list and where there are multiple entries of that surname select the correct record. At present the first matching surname is the one that keeps being selected.

I am displaying the complete record in fields lower down in the same form.

I also have a firstname search combobox but the code will be almost identical.

Can someone help me with this problem. Thanks in advance.

View 2 Replies View Related

Combo To Unlock Text Field?

Nov 24, 2006

Hi! I'm certin this is something really simple, but I just can't remember how I've done it before.

I have a combo box called "ReferralReason" and when a particular option ("Other") is chosen from the list in there, I want the text field "ReferralReasonOther" to become unlocked.

Could someone please tell me:

a) do I type the VBA code for this in the properties of the combo, or, the text field? (Does it even make a difference)

b) what do I actually type?? :confused:

Thanks in advance for your help!

View 2 Replies View Related

Field Is Changed To A Text Box Instead Of A Combo Box

Feb 21, 2012

I understand the problems that can be brought upon ones self by creating the table with lookup fields, But if the table was orginally designed with them and then the Field is then changed to a Text box instead of a Combo box will the inherent problems associated with the lookup within a table disappear?

View 2 Replies View Related

Populating A Text Field From A Combo Box Selection.

Apr 28, 2005

I have a combo where the list is populated with a bit of VB code to create a two field list. When the user selects the item they want from the list it displays the item in the combo box and should populate a text box in the same row with the value from the second column.

This combo is part of an orders subform and the user is selecting a product from the list which displays the product_name and the product_id.

The problem is that the product_id is not filled in and access returns the following error:
Run-time error ‘3101’:
The Microsoft Jet database cannot find a record in the table ‘product_table’ with key matching field(s) product_id.

This is the VB code that populates the list :
[code]
Private Sub comboCatagory_ID_AfterUpdate()
Dim sProd_description As String
sProd_description = "SELECT products_table.product_id, products_table.prod_description " & _
"FROM products_table " & _
"WHERE products_table.prod_catagoryID = " & "'" & Me.comboCatagory_ID.Column(0)
Me.comboProd_description.RowSource = sProd_description
Me.comboProd_description.Requery
End Sub
[end code]

What am I doing wrong?

Thx
Kev.

View 5 Replies View Related

Using A Combo Box To Insert Text Into A Form Field

Oct 9, 2005

This is really hard to explain, but basically I'm trying to use a combo box that has a control source different than it's record source to update another field on the record source. For example, the combo box pulls it's options from a table called "NameList" and when you select an option from the combo box it updates a table called "Results". On this form there are form fields that are bound to the "Results" table. What I want to happen is, when I make a certain selection from the combo box, I want one of the fields bound to "Results" to automatically display text from a different table. Is this even possible? If this is a horrible explanation, please let me know. I need serious help on this one, I've been working on this for a day and a half now. If anyone has any ideas on how to do it a different way, please make suggestions. Thanks in advance!

- Josh :confused:


Also, another thing I forgot to mention, this may help anyone who tries to help me. This "Results" form is basically used as a log utilizing a report to display a sequence of events. I've included a screenshot for visual affect. I have censored a few things for privacy reasons.

View 2 Replies View Related

Forms :: Add A Name To Text 1 Automatically Set Number To Text 2

Feb 14, 2014

I want 2 text , when I add a name to text 1 automatically set number to text 2 (Random),

View 3 Replies View Related

Displaying Text Field Data For The Corresponding Combo Box Selction.

Nov 29, 2005

I am designing a database for my Bank.
But I have a problem, please give solution If you can help me.

I have a Table name "BranchName",purpose for entering Branches of Bank.
Fields are as below.
SrNo. (Auto Number)
BrName (Text)
BrCode (Number)
Region (Text)

Now I had made a Form "Branch".
On this there is one Combo box in which all "BrName" are shown.I made that.
Now I made another Text Field where I want to show the corresponding "Region" automatically appears for the selected "BrName" .

Now how I make this.Any Query or Code Builder Event ??????

View 1 Replies View Related

Update Date Text Field From Several Combo Boxes

Oct 29, 2006

I've searched for this everywhere but I haven't yet found a solution, even though I'm sure it should be pretty simple.

I have 2 combo boxes: cboMonth, cboDay
and a text field: txtYear

cboMonth has values: Jan-Dec
cboDay has values: 1-31

After selecting the combo boxes and entering the year, I want the result to be displayed in a text box, with the format of Long Date.

How is this accomplished?

Thanks for any help!

View 5 Replies View Related

General :: Default Value Of Text Field With Selection Of Combo Box

Sep 9, 2014

In the database attached I have a form called from Candidates.In this form is a combo box where a user can select what company the candidate belongs too.

However some candidates are Private Individuals (do not belong to a company).Therefore, I want the Position field to be set to 'n/a" by default if 'Private Individual' is selected.

View 9 Replies View Related

Forms :: Populate Combo Box After Updating Text Field?

Mar 19, 2013

I am trying to create a login form with the following three basic fields:

txtUsername
cboUsertype
txtPassword

I would like to be able to populate cboUsertype with User types associated to the user I type into txtUsername. I have found many useful tutorial on the web on login procedures. How ever I hardly found anything on how to populate a combobox after updating a texfield. It bis more than a week that I am trying to find a solution but until now I have just been . I would be grateful if you could provide me with either a link on the web or a vb code to make it work.

View 3 Replies View Related

Forms :: Color Text Field Based On Value Of Combo Box

Feb 28, 2015

I have a table named ColorValues with the following three fields:

- ID
- MunsellCode
- RGBValue

30 fields from another table called Color_Analysis are linked to the above with one to many relationships (I've already thought of other ways to normalize data, but this is the most efficient, so no need to go into this topic).

Now, I've constructed a form for Color_Analysis and all 30 fields recording color are included as combo boxes bounded on the ID in ColorValues and displaying the MunsellCode for the user. I've also created unbounded text fields next to the combo boxes and want to use them to display the color that the user selected in the ComboBox. The question is how do I do this?

Essentially I need a piece of code that picks up the value of the combo box (this is essentially the ID in ColorValues), looks up that value in the ID column of the ColorValues table and uses the corresponding RGBValue of the same table as the .BackColor for the unbounded text field.

View 8 Replies View Related

Autofill Text Field Using Combo Box Selection To Generate Autonumber

Dec 10, 2013

Autofill text field using combo box selectionHello,

I'm trying to autofill a field on a form using MS-Access 2010 Web version sharepoint using macros without coding.

The form has an existing Combo Box field called Segment, using the row sources "REW", "WTT", "DBM".

A user begins filling out the form and eventually selects the Combo Box for Segment and selects any one of the segment no Multiple selection

There is another text field, which is actually alpha-numeric, called Job_No. I want this to autofill based on their Segment selection, using this format:

REW-YYMMDD-TTTT, or REW-131210-20001 for example, for today with the time displayed as military time and last Job No.(20001) for REW and Also for WTT (30001) as starting number.

View 1 Replies View Related

Combo Box With Variable Default...........

Jul 10, 2005

:confused: I was wondering if somebody can help with my default combo box problem?

I have a secured database whereby users logon, which is used as a scratch pad for keeping track of Purchase orders. A Form frmUserInput with two relevant fields for this problem 1. User Initials txtUsersInitials and 2. POBook (Purchase Order Book) which is the combo box cboPOBooks both unbound fields on the form.

The txtUsersInitials is generated automaitcally when the form is loaded using a VBA statement txtUsersInitials = Current User.

The list of the combo box is generated from a table tbleUsersPOBook and uses a query qryUsersDefaultPOBook as listed below;

SELECT tblUsersPOBook.UsersPOBookName
FROM tblUsersPOBook
WHERE (((tblUsersPOBook.UserName)=[Forms]![frmUserInput]![txtUsersInitials]));

This generates a drop box showing the Different department codes for each individual. So for some it is only one item for others up to three codes, this part works fine... :)

:cool: However here is my problem.

Since some people can sign off more than one Purchase Order book I have had to add an additional field in the table tblUsersPOBook called DefaultUsersPOBook which is a yes/no field, so only one yes exists for each user who logs on. I have created another query qryDefaultPOBook as listed below;

SELECT tblUsersPOBook.UsersPOBookName
FROM tblUsersPOBook
WHERE (((tblUsersPOBook.UserName)=[FORMS]![frmInputForm]![txtUsersInitials]) AND ((tblUsersPOBook.UsersPOBookDefault)=Yes));

When I place this query in the Default section of the combo box it gives me no result.

Firstly is it possible to have a varying default like this since each user will have a different default?

Or is there maybe a better way of achieving a default which is variable for each user based on thier default Purchase order book in the table tblUsersPOBook for the field "Yes" in DefaultUsersPOBook ? :confused:

View 8 Replies View Related

Display Variable/Constant Value On Text Box

Sep 15, 2005

Hi all,

I tried to display a variable and constant onto a text box by putting =myvariable onto the data source of the text box. However, Access seems keep threating my variable as a data field and giving me error message. What to do with this?

View 1 Replies View Related

Variable Default Data In Text Box

Jan 20, 2007

I am working on a database for my boss that stores the results of monthly file audits and generates reports.
Each month about fifty files are checked against a check list and the results are to be entered into the database. Reports are generated quarterly.
I have a date field that holds the date of the review. I would like the default value of this field to be what ever was entered in the previous record. That way this field can be tabbed through until the next month. When the data in the field is changed that will become the new default for the following records.
I don't have any formal VB or VBA training. I just learn what I need for each project and save it for later use.

Thank you for any help you can provide.

Henry L Michel

View 2 Replies View Related

Variable For Holding A Calculation For A Text Box

Oct 8, 2005

Hello,
I've got a text box on my form header with a calculation in the control source that adds values from other text boxes on my form.
My problem is that since the calculation is in the control source of my text box I can not save the sum of the calculation to a field on the forms bound table.
Is there a way to move this calculation out of the control source and still have the calculation populate this text box with the sum of the calculation, so I can choice a field in which to save this calculations sum.

Calculation in the text box control source=
[Tot40yrcomp]+[Totfelt1536]+[Totfelt3036]+ there will be many more other text boxes added.

It was suggested to me to have a Variable hold the calculation, I’ve been trying to write a variable but nothing seems to be working, I’ve been trying to place this variable I made into the after update and before update of the text box Nothing works I get all 0.00 in the form header text box, Here’s the code for the variable I made, can some one see if it looks correct.

Dim calcVariable
calcVariable = [Tot25yrcomp] + [Me.feltstot]
mat25yr = calcVariable

I was wondering if I need to say Me.mat25yr = calcVariable

Thanks--Any help will be greatly appreciated.

View 1 Replies View Related

Variable For Holding A Calculation For A Text Box

Oct 8, 2005

Hello,
I've got a text box on my form header with a calculation in the control source that adds values from other text boxes on my form.
My problem is that since the calculation is in the control source of my text box I can not save the sum of the calculation to a field on the forms bound table.
Is there a way to move this calculation out of the control source and still have the calculation populate this text box with the sum of the calculation, so I can choice a field in which to save this calculations sum.

Calculation in the text box control source=
[Tot40yrcomp]+[Totfelt1536]+[Totfelt3036]+ there will be many more other text boxes added.

It was suggested to me to have a Variable hold the calculation, I’ve been trying to write a variable but nothing seems to be working, I’ve been trying to place this variable I made into the after update and before update of the text box Nothing works I get all 0.00 in the form header text box, Here’s the code for the variable I made, can some one see if it looks correct.

Dim calcVariable
calcVariable = [Tot25yrcomp] + [Me.feltstot]
mat25yr = calcVariable

I was wondering if I need to say Me.mat25yr = calcVariable

Thanks--Any help will be greatly appreciated.

View 1 Replies View Related

Forms :: How To Populate Bound Text Field With Text From A Unbound Text Field

Mar 22, 2014

I have 4 fields that are unbound on a form. img1 img2 img3 img4..When these are entered they are all combined and autofill another unbound textbox = imagename.. what i would like to do is from this unbound textbox 'imagename' ..i would like to populate a textbox that IS bound called FileName

[Event Procedure]
Private Sub imagename_Click()
Me.imagename = Me.FileName
End Sub

View 4 Replies View Related

Popup Box - Setting Up A Combo Box To Update A Variable

Oct 7, 2005

hello,
newbie needs help!!!
I have a globally defined variable (gsUser) which I defined in a module.
The idea is that when one of my users creates a record then , I will update a column called "Created by" with the current users value.

The issue is how to get the current user name.

In my main form , in the "beforeinsert" and "beforeupdate" events I have triggered a call to a function in my module (function WhoAreYou)

This function checks the value is gsUser and if blank it then does a DoCmd.OpenForms to my popup form.

The popup form needs to contain a combo box whoses recordsource is pointing at a table of users I have created BUT whose source control is not pointing to a table of any kind.

How can i set up this combo box so that a user can be selected, but the selected user then populates a variable instead of a data column??

I would then user the variable to populate gsUser.

if you could give me an example I would be gratefull


Alternatively if you can think of another way of making the user pick his name from a list of usesr before updating data I would be glad to here it

Thanks in advance for your help
MartyK

View 12 Replies View Related







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