Ask Your Question
0

BASE table element drop down list steps

asked 2020-06-10 09:58:17 +0200

Aquadom gravatar image

I'm trying to implement a simple employees form with a table element containing drop down lists for the departments. I've created a table for employees and another for departments, linked them in the relationships wizard and used the form wizard to create a form with a table element to display the records. I've edited the form table column for department to be a drop down but when I use the form the drop down is empty (there's data in both the tables that should be flowing through). Can someone tell me if I've missed a step in the process please?

edit retag flag offensive close merge delete

Comments

@Aquadom,

It is not clear as to why you linked the employee and department tables. The department table is only to be used for the list box for a selection into the employee record.

Need to know how the list is constructed for display of data. Posting a sample of your Base file is probably the easiest way (no personal or confidential information).

Ratslinger gravatar imageRatslinger ( 2020-06-10 17:51:41 +0200 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2020-06-10 22:48:05 +0200

Ratslinger gravatar image

Hello,

Attached is a Q&D sample. It has the employee records in a table grid with a list box for the Department selection. In edit mode, look at the properties of the department column on the Data tab. There you will find the SQL used. Note there is no linking between tables.

Sample ---- EmployeeDept.odb

edit flag offensive delete link more

Comments

@Aquadom,

Did not actually list steps to accomplish as there are different methods to creating a list.

Ratslinger gravatar imageRatslinger ( 2020-06-11 00:32:53 +0200 )edit

@Ratslinger, I was niavely hoping the form wizard would pull data through using the relationships model once i selected the replace with drop down list option. My demo db is actually identical to the one you've recreated here... except without the additional SQL, which I now understand.... thank you very much for your help with this :)

Aquadom gravatar imageAquadom ( 2020-06-11 06:04:33 +0200 )edit
0

answered 2020-06-10 15:18:24 +0200

keme gravatar image

updated 2020-06-10 22:07:31 +0200

You need to define a "subform" for linked tables, set up the relationship between the table in the subform and the one on the main form (assign key field(s) to foreign key), and move the linked control to that subform.

A subform does not need to be visually separated from the main form. It is just an underlying structure definition.

IIRC, the form wizard allows for the creation of one single subform. If you didn't ask for that at create time, or you need to manage a more complex data structure in your form, use the form navigator. See this help page

edit flag offensive delete link more

Comments

@keme amending the SQL code for the column works for me but your answer has helped me understand the use of subforms and the relationship tool, thank you

Aquadom gravatar imageAquadom ( 2020-06-11 06:22:17 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2020-06-10 09:58:17 +0200

Seen: 45 times

Last updated: Jun 10