Combo Box Dropdown List from Table - forms

First time creating forms to insert into a database.
I'm trying to create a drop down combo box that lists the entries in the second column...
This is in a seperate table. The issue I'm running into is how do I show what's in the Description column, but when I insert into the form, it's corresponding PMRT_Need value is put in the table.
The database is as such that it HAS to be the PMRT_NEED value unfortunately.
Thanks for your time!

After setting the Row Source to your appropriate table/query:
Set the Bound Column to column 1 (i.e. the PMRT_NEED field)
Set the Column Count to 2
Set the Column Widths to something like 0cm;5cm (adjusting the second width to suit your data) such that the first column isn't displayed to the user.
This ensures that your combo box returns the value of the PMRT_NEED field for the selected item, but only the Description is displayed to the user.

Related

SSRS cannot linked text box with field

I group my table by 3 attributes, and set page break on every group, and now i want to display that three attribute outside the table. I want to place them on the top of the report, and when i type the expression and i go in run view it's display only the first value, when i go to the next page nothing change
I tried to drag field from table, from data set, and nothing working.
In expression i type
=Fields!My_Field.Value.
Also if some of that three attributes i placed in table it normally displays values, but when i try to move it somewhere it stops displaying.
The issue is that a table is associated with a dataset but a text box is not.
You can reference a field from a text box using the Dataset field ( =Sum(Fields!AMOUNT.Value, "Dataset1") ) but you need to use an aggregate function like First, Last, or SUM.
It sounds like you don't want to use an aggregate since you are grouping by these fields, though.
display the three attribute outside the table
If your trying to display the current grouping in the table at the top of each page, add a new Row in your matrix above your header row and add your group fields there.

apex tabular form icon link column

I am working with a wizard-generated Tabular Form column that needs to display an icon which launches a Javascript function and pass the row value into the function when clicked. The function launches a popUp2 window which sets the values of other fields on that row. So the row number is crucial, but it is always 0 for newly-created rows (in APEX 4.0.0.00.46). I managed to solve that problem by storing the rowNum of new rows into my Updated By column during AddRow.
What I have now is an Updated By column ("Lookup" Heading) which stores the row number of new rows, has onClick="javascript:usePopup(this);" in the Element Attributes which launches the popUp window function, and then gets any values under 2 digits wiped before submit. This fills the correct fields and submits to the table with no problem.
I can't keep using the Updated By column for this function, though. There are currently reports running on this table, so I can't add a new column to the table. I need a dummy column to display the icon, temporarily store the Row Number of newly created rows, and not mess up the MRU. It is f08, so the value of f08_0005 needs to be 0005. I tried making a null column with
select
"FUEL_USAGE_DETAIL_ID", ...
"EXPENSE_TO_PROJECT",
"EXPENSE_TO_TASK",
NULL Lookup,
"UPDATED_BY",
"PROVIDER"
from "#OWNER#"."FUEL_USAGE_DETAIL"
but that can't submit. I get the Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-20001: ORA-20001: Current version of data in database has changed since user initiated update process. current checksum = "01A949FAF0B3A91914ECACCDC9BBA9E6", item checksum = "B6ADF86455B14EF691B2AFB314926A0D".
Please help me create a null column to display this icon, store the row number of all the rows (including the brand new rows), and not mess up the MRU. If you need pictures of what I have and what I need, see my other thread: https://community.oracle.com/thread/3649771 Thank you!
Fractal65,
Do not add any null column in tabular form.
just go to>>Edit tabular form attribute make following change
you will get it position as f02_000X (x-rownum)
now uou can use this rownum value in javascript or anything.
Hope this helps.
I had a similar error with my last project. Do you have a none displayed row selector? Please try to delete it to see if it will work.

How to populate the value of a Text Box based on the value in a Combo Box in MS Access 2007?

I have a combo box which is of a lookup type, i.e., I've selected the source to be a column from a table and am storing the selected value in another table. The table which I am looking up has another column and I need the value in this column to be displayed in a text box and each time I change the value in the combo box, I need the corresponding value to be displayed in the text box. How can I do this? What I have done so far is to write a Select query that selects the appropriate column based on the combo box's value. Is there a more decent way of doing this? Please help me!
Make the source of the combo box to your 2 fields e.g. SELECT id, name FROM Customers
Make sure you set the Column Count property of the combo to 2, accordingly.
Then make you unbound text box source equal to =MyCombo.Column(1) (from memory, this Column is zero based).
That's it, zero code required.
It's nicer to use an event of the combo box e.g. onChange, so when a selection is made the event sets the value of the text box.
me!txtTextBox1 = me!cboComboBox1.column(1)
That way it will work everytime.
You could also use a button with onClick etc. but the choice is yours (and as mentioned in the previous post, alter the column number based on its row source with 0 being the first.
After reading the question and answers I tried the following, and it seems to work well (so far):
In order to display more than one column of a combobox selection, I have resorted to the following:
Place a textbox over the combobox,
Size it by sampling other fields, so that it covers the text frame of the combobox.
I have purposely have left a small space to the right of the NEW textbox to indicate that it
Is NOT part of the combobox.
In the Control Source for the textbox enter the expression below:
=[DefaultAcct].[Column](1) & " " & [DefaultAcct].[Column](2)
Then, in the ‘onchange’ event of the combobox, set focus to the textbox.
Private Sub DefaultAcct_Change()
txtConcatenate1.SetFocus
End Sub

How do I hide the left-most column in an SSRS 2008 matrix?

I have a matrix in an SSRS 2008 report. The rows are grouped on the Time field, and the columns are grouped on the FieldName field. Pretty standard stuff, you can see the designer view of it below.
This works pretty well, except that in some instances I need to hide the "time" column (highlighted in the image).
I've tried setting the Hidden property, both on the column itself and the individual fields. This leaves a large empty area where the column would normally display. I've tried setting the hidden value for the time row group, but that hides the entire row of data.
Is there any way to hide this information with SSRS 2008?
I was able to find a work-around with a little experimentation. Here's what I did:
Added an adjacent column group to the FieldName column. This column was grouped on Time (the same as the row group).
Set the header of the new column group to always display the text "Time."
Right-clicked on the selection button for this new column and selected "Column Visibility..." from the list. Entered the hidden expression I wanted.
Deleted the original Time column, choosing to retain the associated group.

MS Access 2003 - Listbox formatting control

Just some general formatting questions about return records to a list box on a form:
I have a list box that returns sets of records based on SQL statement in VB. I need the SQl statement to return the ID (auto number) of each record, because if the user selects from this list box, I need the ID as a pass parameter to the next form. But I do not need the ID to show up in the actual list....anyway i can hide this, or just not display it?
I used rowsource like this:
me.searchlist.rowsource = "SELECT TblMain.MainID, TblMain.First, TblMain.MiddleTblMain.Last FROM TblMain ORDER BY TblMain.Last, TblMain.First DESC;"
Also the listbox has no headers, which i want, and has three columns for above example...but each column is way too big, can i control the width size of each column area inside the listbox? I tried the properties window, but that only seems to effect the first column and not all of them.
For the Header, the Listbox has a
property called Column Heads
(default no). Set this to Yes.
For the column widths, the Listbox
has a property for Column Count and
Column Widths. In your case you can set Column Count to 3 and Column
Widths to something like 0;2;3