First, I tried to create a multivalued combo box in a form but the Lookup Wizard didn't give me the option like it does in a Table.
So...then I created exactly what I wanted in the field in the table. I know how to display the correct values you want using column bound, column width, etc.
I thought I could create a text box in the form and bound it to the appropriate field in the table. But the result I get is the ID number Access assigned to each record...not the descriptive value I actually want. How do I get the descriptive field (not the ID) to display in my form?
Thanks.
Use a combobox.
ControlSource = field name
ColumnCount = 2
CoulmnWidths = 0cm
Related
In a dataverse table I use autonumber as the primary name column. When I add existing rows (n:n relation) using a subgrid, a search pane is displayed on the right side of the screen. The quicklist shows up correctly, but it doesn't make sense displaying in the list of selected items.
How/where do I change this?
Typically the grid/list/card will show the first three fields of lookup view designed for that entity while searching/associating. You have that luxury to rearrange the fields to display including name, auto number and other fields.
Lookup display field is designed to show the Name field of that entity record by default (only choice). Since you are using auto number type for that Name field, it’s showing only auto number - this is expected.
Normally we will have a separate auto number field and concatenate few fields along with auto number to the Name field to make sense. But you chose the other way.
I have one Combo Field and one Text Box Field in my Access DB's Form.
I would like to have my 2nd Text Box Field to get the data from a Table based on the Combo and Text Box Field Data.
Is it possible? or auto-fill in the Access text box only can base on a combo box?
Example:-
The combo field was selected from table-1 consists of the equipID_PK and equipDesc.
The 1st Text box contains the data obtained from the table-2 Block, Floor, and Room. When Block was selected, the floor and room (1st Text Box) will auto-filled.
Based on the combo field (equipDesc) and 1st Text Box data (Room Field), I want the 2nd Text Box to fillup a subEquipDesc which is from Table-3.
I need help on how to set up this Table-3. Some of the Equipment (EquipDesc-in Table-1), when placed in a different room, will have a different description (different software loaded), I called it SubEquipDesc.
Hope is clear and let me know if more explanation is needed. Thanks.
If you add the extra field to your combo box, increase the column count, and set the column width to be 0 (so that it isn't shown to the user), you can then set the ControlSource of the text box to show this hidden column:
=[Combo0].[column](2)
Note that columns in a combo box are 0-indexed, so the example above shows the third column of data.
Regards,
I think that you are describing a "junction" table. Your table set-up should be something like:
tblEquipment - EquipID (Primary key), EquipDesc;
tblRoom - RoomID (Primary key), Block, Floor, Room;
tblRoomEquip - RoomEquipID (Primary key), EquipID (Foreign key from tblEquipment), RoomID (Foreign key from tblRoom).
In the form that is based on tblRoomEquip, you should be using combo boxes to select the information for Equipment and Room, based on the respective tables. Using a text box is not recommended when you have the information already stored in a table.
Regards,
Forgive my ignorance for the proper terminology, but let me try to explain what I want to happen.
I have two custom fields on the incident table/form. I have created a custom table with 2 columns. I have figured out how to reference the table in one of the fields, allowing me to search the entries. Now I want to link the field selection to the other field via the custom table I made. When I make a selection in field A, I want field B to populate with the other column on the same row Field A pulled from in the first place. How would I do that?
Sounds like you want what's commonly referred to as a "derived field" or a dot-walked field.
You have a reference field which stores the reference to the other table, and want a second field on the form that shows another field on that referenced table. You don't actually need to create a new element, you just need to add a dot-walked form element.
Once you have the reference field added, go to Personalize/Configure the form layout.
In the slushbucket of available fields, you'll notice that reference
fields show up in green text with a little [+] next to them.
Select your reference field and a little button will show up between the two
lists, just above the "Add" button
Click that button and the left-side available fields will show the fields available on that reference field's table.
From here, select that second field that you want to display on your form, and bring it over to the right side where you want it.
I am having a list of InputColumnsVO which will have column name and column datatype attributes..I am thinking to iterate this list of input columns object using Listview and display input boxes based on the column data type.For example:
if datatype is date,
display DateTextField,
if datatype is numeric,
display dropdown,
if datatype is string,
display a textfield.
Is this achievable in wicket?or is there an alternative way to the design?
Depending on the type add a Panel that contains the respective form component. If the HTML markup is really simple and you don't want to have a special Panel for it then use a Fragment instead.
We do it in a similar way: we have a listview/dataview of configuration options that populates the item with a widget retrieved from a factory for creating editors based on datatype of that option. Factory returns FormComponent/FormComponentPanel/Panel that we add to the item.
I've got an autocompleter in a CakePHP app that provides a dropdown list of neighborhoods to attach to a place. I'm pulling from a table 'neighborhoods' with name and id fields. I want the user to see the name of the neighborhood, and I want the app to see the id of the neighborhood and insert it into the places table. How can I make this happen?
Another way of doing this would be to storing the id. Then when a user presses submit you replace the input field's value with your stored value.
assign the correct (hidden) value to a hidden input field
This type of functionality is normally achieved with a combobox, which is like an autocomplete, with an underlying select elememt, see here