f



Fill text box based on combo box selection

Okay this one has me stumped. I have a table called Review_Statements
with the following columns:

statementid
type
statement1
statement2
statement3

I have a form called SR_Review with an unbound combo box control
(rationale_type) that is based on the statementid and type field of
the table above.

I also have another text box control on the same SR_Review form called
rationale. This field is bound to field called "rationale" in another
table called SR_Reviews.

Here is what I *want* to take place. The user makes a selection in the
rationale_type combo box, and based on the statementid of their
choice: combine statement1, currentuser, statement2 and statement3 for
that same statementid in the rationale text box (so it's stored in the
rationale field of the SR_Review table). i.e., me.rationale=statement1
& currentuser & statement2 & statement3 where
review_statements.statementid = me.rationale_type

I can't for the life of me figure out how to do this in vb code. Can
anyone help get me started?

The reason I need to break up the paragraph or statement this way is
that I need to track exactly who made the selection - I have to
somehow get the currentuser into this paragraph and it's the only way
I could think of. If you have any other wise ideas that I hadn't
thought of I'd be happy to hear.

Deena


0
peasedm (2)
3/27/2008 6:22:13 PM
comp.databases.ms-access 42670 articles. 0 followers. Post Follow

1 Replies
958 Views

Similar Articles

[PageSpeed] 48

Duh - I figured this out so please ignore.
0
peasedm (2)
3/27/2008 7:07:30 PM
Reply:

Similar Artilces:

Fill combo/list box based on previous combo box selection?
I am fairly new to database design and am having some difficulty getting my combo boxes to work as I'd like them to. I would like to create a form with two combo boxes; the first one would select �JobNum' from my master job table and the second would select a �Supt' associated with the selected JobNum. My tables are setup like this: -tblEmp: Emp# (PRIMARY KEY), EmpName, etc. -tblSupt: SuptEmp#, Job# -tblInjury: InjuredEmp#, Job#, Supt#, etc. -tblJob: Job# (PRIMARY KEY), JobName, etc. How can I setup my two combo boxes so that: Combo Box 1 selects Job# from the list of Job#'s? I can get this far, but a can't seem to tackle the AfterUpdate event in order to successfully populate the 2nd combo box. And Combo Box 2 selects an associated Supt#, a list populated from the selection in Combo Box 1? Thanks in advance for any assistance. Nick Nick, If I understand you right, you want to select a Job# and have the second combo box update to show Supt#'s for the selected Job#. This is what I would do. This is done using a form. Since you have the Job# combo box working let's look at the Supt# combo. Create the Supt# combo like normal. Then go to the properties of the Supt# combo and go to the data tab. Then goto row source and click the build button. From here you can add the Job# field from your tblSupt to the design grid and set the criteria to the Job# combo box on your form. This will tell t...

Populating text box based on combo box selections
I have a form that contains two combo boxes that are related to each other. I need to find a way to populate my text box based on the criteria of the two combo boxes so the appropriate number appears in the text box. "SHAWTY721" <u38136@uwe> wrote > I have a form that contains two combo boxes that > are related to each other. I need to find a way to > populate my text box based on the criteria of the two > combo boxes so the appropriate number appears in > the text box. It's just not possible to be very helpful with the information you provided (Whi...

Combo box fills text box
Hello again, I have a form that fills a text box with data according to the selection in the combo box. Two questions please: 1) The combo box does not have a control source so when opening the form, the combo box is empty but the text box already contains the first record. What do I need to do to either have both the combo box and text box empty on open or have both contain the first record on open. (If it takes VBA code, please point me in the right direction as I have not worked with it since '99). 2) I'm getting a runtime error 3077 on one of the records. I checked it to see i...

Changing combo box list based on another combo box selection
I have a continuous form that has one combo box (cbo1) with the selectable values of "Removal" and "Installation". I would like to change another combo box (cbo2) value list based on the selection in cbo1. For example, when the user selects "Removal" from cbo1 I would like the value list of cbo2 to be one set of values and when "Installation" is selected in cbo1 I would like the value list of cbo2 to be a different set of values. Is this possible? Thanks in advance. Troy Lee troy_lee@comcast.net wrote: > I have a continuous form that has one combo box (cbo1) with the > selectable values of "Removal" and "Installation". I would like to > change another combo box (cbo2) value list based on the selection in > cbo1. > > For example, when the user selects "Removal" from cbo1 I would like > the value list of cbo2 to be one set of values and when "Installation" > is selected in cbo1 I would like the value list of cbo2 to be a > different set of values. > > Is this possible? > > Thanks in advance. > > Troy Lee Sometimes cbo2's rowsoure might be "Select fld from table where id = " & cbo1 In this case, in the AfterUpdate event of cbo1 you'd enter Me.cbo2.Requery You might have to change the rowsource in other cases If me.cbo1 = "Install" then Me.cbo2.rowsource = "Select fld from table1" Else Me.cbo2.row...

Populate text boxes with combo box selection
I need to populate text boxes for instance with employee information using their unique employee works number selected from a combo box. Can anyone help, I am told thru visual basic this can be achieved. godber wrote: > I need to populate text boxes for instance with employee information > using their unique employee works number selected from a combo box. > Can anyone help, I am told thru visual basic this can be achieved. You can do it without VBA. Add extra columns to the combo box Set the width of the columns to 0 if you want to hide them In the text bnoxes you want to show the...

Listbox based on text box and combo box.
On an unbound form, I have a combobox called 'cboproducttype' and a text box called 'txtamountappliedfor'. I have an Add button that I would like the user to be able to hit once a product and amount applied for has been entered. This should populate an unbound listbox to display their selections. A user can select one or more sets of product types and the amount applied for. They should also have the functionality to remove a 'set' if they made a mistake without the need to rebuild the whole listbox of selections. Then - I want to loop through the listbox of select...

Combo box dependent on another combo box, text part is blank
Hi, I have a form with several combo boxes, continuous form format, with record source a query off an Item Table. The fields are Category, Subcategory, and Color. I am displaying descriptions, not ID's, so I have to convert the ID's from various lookup tables. The combo boxes work fine except for subcategory, which is dependent on category. Depending on category, the drop-down box for subcategory will display different items. (for example, when Category is Furniture, Subcategory will display drop-down list of 'Dresser, Nightstand, Desk...". Without clicking on the drop...

Text box linked to combo box
Good day, I am new to Access and need a question answered please. I have a form based on a table (tblQualityEmployees), for some of the fields it looks up a value in another table (tblGroups). The tblQualityEmployees consists of the following: EmployeeID FirstName LastName Group1 Group2 Group3 Group4 Group5 The tblGroups consists of the following: GroupID Groups Description What i want to do is, in the form have text box that displays the Group description next to each group. I tried making the "Control Source" field Group1 combo. This brings in the relevant ID number which is...

Displaying text in a text box depending on selection made in list box on same form
Hi I have an unbound text box on a form from which the user can choose a product. When the user chooses a product, I want the text box on the same form to display the description of that product. right now I can get it to display the row number of the product that corresponds to what the user clicked but not the value of the Product Description which is what I want. The fields in the tables are both text. here is the code: Private Sub LstContactProducts_AfterUpdate() txtProductDescription.SetFocus txtProductDescription.Text = LstContactProducts.Column(2,txtProductDescription) End Sub Thanks in advance Colin Colin, why don't you create the combobox, with from a table or query with all the information you need and use cboComboboxname.column(0), cboComboboxname.colum(1) etc etc...to populate the fields you want? HTH Michael "Colin Ward" <cward002@sympatico.ca> wrote in message news:2a660c80.0308010710.26b3257@posting.google.com... > Hi I have an unbound text box on a form from which the user can choose > a product. When the user chooses a product, I want the text box on the > same form to display the description of that product. right now I can > get it to display the row number of the product that corresponds to > what the user clicked but not the value of the Product Description > which is what I want. The fields in the tables are both text. > > here is the code: > > Private Sub LstContactProducts_AfterUpdate() > txtP...

Text from required text box to read-only text box
Hello, I am fairly new to JavaScript and its use in Acrobat Professional. My situation is this: I have a form with a text box field which is required for the user to enter his/her name. I would like the required text box to display the name in all caps. I also need the user's name to appear in a read-only text box later in the form, which I would like to have the first letter of the user's first, middle initial, and last names to be capitalized. I would also like to have all required fields on the form highlighted in yellow, but the highlighting not printed. Lastly, I would like the...

combo box / text box php mysql
this is the the code, now here is the final result.... I get one combo box and one tex box come up, but they are empty... DAMN!!! Any ideas on what Im doing wrong please.. Thanks Again <?php require_once('..\library_database\Connections\onlinequote.php'); ?> <? function select_cases_price () { $qy = "SELECT SellingPrice, Description FROM cases"; $rs = mysql_query ($qy) or die (mysql_error ()); while (mysql_fetch_array ($rs)) { $select .= "<option value='{$r[0]}'>{$r[0]}</option>\n"; $prices[] = $r{1}; } return array ($select, $prices);...

update a text box using combo box
Hi all, I have 3 unbound combo boxes in my form which basically helps me to filter for values. I need to update a text box which will be stored with the value I receive after filtering with the combo boxes. I know of the column(n) method (derived from the third combo). However if the user does any sort of manipulation in the first or second combo then the value in the text box doesn't change accordingly. Is there any other way to update the text box in a more accurate way. Please help. TIA -- Regards, B Burghew wrote: > Hi all, > > I have 3 unbound combo boxes in my for...

Auto-Fill text box from list box
To All: There is a list box populated with text (ie.names of places). A user makes a selection by scrolling through and double-clicking in the list box. This selection is then shown in a text box. How can I eliminate the user's need to scroll through the list box and double-clicking the selections? Is there a way of automatically filling the text box with matches from the list box as the user is typing in the text box? There seems to be no direct autofill property based on user input at runtime. All help appreciated. Z "Zuzka" <zuzkamiernik@yahoo.com> wrote in message n...

Update Combo Box from a Text Box Help
I am trying to make a combo box dependent on a text box. I cannot get the combo box to pull the related data from the text box. I have been all over this user group & have tried several versions of code to no avail. I would like to display all contact names (in the combo box) related to the customer number in the text box. Here's what I have: Table: TOrdAck Fields: OACustID, OAContact Table: TCust Fields: CustID, CompanyID, CompanyName Note: The OACustID and the CustID establishes the relationship between the two tables. Query: QCust Fields: TOrdAck. OACustID, TOrdAck.OAContact...

help: combo box vs. text box
Please help! I have a table "tblDept" with columns like DeptName, DeptChair, DeptPhone. In a form, I created a combo list that holds all the DeptName. By selecting one of the DeptName from the combo list, I want the DeptChair and DeptPhone to be shown automatically in two text boxes. The following code is trying to show the DeptChair in a text box. Private Sub cboDeptName_AfterUpdate() Dim MySQL MySQL = "SELECT DeptChair " MySQL = MySQL & "FROM tblDept " MySQL = MySQL & "WHERE AttorneyName = " MySQL = MySQL & "'" &...

Unbound text box, text>255, MS Access/PostgreSQL
Hello. I have the following problem with MS Access/PostgreSQL combination: There is a form in Access that has an unbound text box, used for entering a commentary of a batch of records. There is a DAO Append Query that has a parameter that is passed from the text box using parameter of DAO QueryDef object. I adjusted B7 parameter (Text as LongVarchar) in connection string (ODBC driver) to 1, so that Access links PostgreSQL Text fields as Memo fields in Access. The intention was to be able to enter unlimited length commentary into the field. But, although I can enter unlimited text by using...

select of select box will select multiple in another box
Im trying to do the following: I have 2 select boxes, both are pre populated with data. The first box is a single select box, the 2nd is a multiple select box. Depending on the 1st selection, I want to have multiple values in the second select box highlighted. ie box 1 <select name=type> <option> warm colors <option> cool colors <option> shades of grey </select> box 2 <select name=colors multiple> <option> red <option> orange <option> yellow <option> blue <option> green </select> If the user would selec...

COMBO BOX, FILTER TEXT BOX AND NEW RECORD
I made a database with two tables (tblsender, tblreceiver). I have two combo boxes on the form. I can autofil all text boxes based on the value entered in the combo box (for example, cbosender_name.column(2) etc). But when I want to add a new record, I can enter only to the combo box and cannot add anything to the text boxes because they are bounded to the cbosender_name. Can anyone please help me? Thanks. ...

How to add a chosen value from a combo box into a text box
How to add a chosen value from a combo box into a text box, hereby using a command button? Bart Access 2003 if you want to *display* the value in an unbound textbox control, you don't need a command button. just set the control's ControlSource property to =[ComboboxName].[Column](n) replace ComboboxName with the correct name of the combobox control, and replace n with the column index number (remembering the index in a combobox control is zero-based - first column (0), second column (1), etc.) if you want to *store* the value in a textbox control bound to a field in the form's underlying table - i'd say probably you shouldn't. if the combobox control's RowSource is a lookup table, then the data is already stored in one place. storing it in an additional table is a sign of a non-normalized design. that's acceptable if you're storing point-in-time lookup data that will change in the lookup table over time, but otherwise, probably not. if you're using a value list as the control's RowSource, then i'd advise putting the values into a lookup table instead, where they'll be readily accessible to the rest of the program without needing to store duplicate data in your data table. having said all that, if you have a valid business reason (such as point-in-time storage of changing data) to store the lookup value in the data table, you can add code to the combobox control's AfterUpdate event, as If Not IsNull(Me!Combobox) Th...

selecting list box entry using a combo box
I have a combo box that lists street numbers. I also have a list box that lists street numbers and addresses (separately). I want to click on one of the street numbers and have the first item in the list box with that street number selected. Any suggestions will be appreciated. Deborah Hi Deborah, Not going to ask you “why use a listbox?”. But here goes… Use this air code in you combo box afterupdate event. Assuming both control in the same form. Me.ListBoxName.RowSource = “SELECT StreetNumber, Addresses,…..FROM Table1 Where StreetNumber = “ & Me.ComboxName I’m assuming your Stre...

How to change the properties of Text box depending on the value of combo box.
Hi, I have created a combo box with "", Yes,No so that if user select any other option except Yes the text box should become disabled. For this I have written code in the exit event of the combo box it is working . But the problem is that, after reopening the form, if you navigate to same record it shows the check box enabled. Can anyone help me how to solve the problem. thanks Pervaiz Try using the same code in the 'On Current' event for the form. At present your code works ony if you exit the combo box, so when you open the form it won't run. With the 'On Curr...

Unbound combo box: I can't select an item in the box
I have a strange problem. When I put a combo box into a form, and set a row source, when I display the form I can pull down the list of items, but when I select an item it does nothing. It doesn't call the event handler it doesn't select the item into the combo box: nothing. The combo box is unbound. I didn't change the properties of the combo, just the default ones the control wizard supplies. I think I have done this many times before, but this is the first time I tried with Access 2002, am I doing something really dumb? And if so, what can I do to fix this problem? Thanks. &q...

Fill from Combo Box Selection
Hello, I need some advice on which way to resolve the following. On a form, the user will make a selection from a combo box, after the selection several different fields need to be updated on the form, based on the selection in the combo box. I have been doing this quite successfully by having the combo box rowsource query contain all the fields and simply use the correct column to fill in the text boxes. e.g. me.txtState = me.cboSelection.column(2) My question? I now need to populate 12 fields, which will bring the columns in my rowsource query to 14. Is this query too big for thi...

Referencing a toolbar combo box in MS Access
Is there a way to determine the value of a combobox that resides in a toolbar other than using CommandBars.ActionControl? I want a user to be able to change the combobox and be able to refer to the selected value later, not immediately, and without having to set a public variable. This refers to the toolbar when adding a combobox to the toolbar: CommandBars("myToolbarName").Controls.Add(Type:=msoControlComboBox) But what referes to the combobox once it's created? Any help is appreciated. LQ I found a way to do this for anyone who had the same question: '***START CODE*** Dim objBar As CommandBar, objCbo As CommandBarComboBox, myIndex As Integer Set objBar = Application.CommandBars("myToolbarName") Set objCbo = objBar.Controls("myComboName") myIndex = objCbo.ListIndex Set objCbo = Nothing Set objBar = Nothing '***END CODE*** laurenquantrell@hotmail.com (Lauren Quantrell) wrote in message news:<47e5bd72.0309040455.2143a9a2@posting.google.com>... > Is there a way to determine the value of a combobox that resides in a > toolbar other than using CommandBars.ActionControl? I want a user to > be able to change the combobox and be able to refer to the selected > value later, not immediately, and without having to set a public > variable. > This refers to the toolbar when adding a combobox to the toolbar: > CommandBars("myToolbarName").Controls.Add(Type:=msoControlComboBo...

Web resources about - Fill text box based on combo box selection - comp.databases.ms-access

Selection - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

World T20: Khawaja, Finch in selection battle - DailyTelegraph Search Search
UPDATE: AARON Finch appears in the box seat to hold off a strong challenge from Usman Khawaja and open for Australia at the World Twenty20.

World T20: Khawaja, Finch in selection battle
UPDATE: AARON Finch appears in the box seat to hold off a strong challenge from Usman Khawaja and open for Australia at the World Twenty20.

Wilson wins selection in Goldstein
Frm Human Rights Commissioner Tim Wilson has been selected as the Liberal candidate in the seat of Goldstein

March Madness: Selection Sunday has arrived
This year, Selection Sunday features five conference tournament championships before brackets are released.

Selection Sunday Has Wildcats, Owls, Hawks Fans Pumped
The NCAA college basketball selection committee has ruled, and three local teams are on the tournament bracket this March Madness.

How NCAA selection committee seeds March Madness tournament - Videos - CBS News
It is a big weekend for men’s college basketball. March Madness is about to begin, and the men’s basketball selection committee will announce ...

People Were FURIOUS The Selection Show Took Two Hours
People Were FURIOUS The Selection Show Took Two Hours

How Much Did The NCAA Selection Committee Screw Your Team Over?
In the long, drawn-out days between Selection Sunday and the beginning of the round of 64, college basketball fans have two pastimes: filling ...

March Madness Tax & Tournament Tips On Selection Sunday
It's Selection Sunday! Thinking of participating in a NCAA Tournament pool this year - either at the office or among friends? Here are some stat ...

Resources last updated: 3/20/2016 8:36:58 PM