New List

jbklee

Board Regular
Joined
Apr 22, 2003
Messages
106
Can anyone point me in the right direction please

I want to create a new table with three columns of text data from an existing similar table, live, as the individuals named in the existing table present themselves for registration.
Ideally I would like it to present a list of names with each keystroke (just like autofill tries to help out with entering data in rows) in a list/combo box from the original list from which I could highlight the correct name and then send it to the new list. The names or details sometimes need editing on the spot also.

New to VBA

Thanks in advance
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Hi, are you trying to transfer data from one table to a related table? Or do you want to create a dynamic list which helps with selection of registrants? The reason I ask, is that the first option is probably best done via a drop-down in a subform. The second is best done with a multi-column list box. You don't need to create a new table to populate either of these, but you can push the data wherever you like. More details, and we can get you started.

Denis
 
Upvote 0
SydneyGeek said:
Hi, are you trying to transfer data from one table to a related table? Or do you want to create a dynamic list which helps with selection of registrants? The reason I ask, is that the first option is probably best done via a drop-down in a subform. The second is best done with a multi-column list box. You don't need to create a new table to populate either of these, but you can push the data wherever you like. More details, and we can get you started.

Denis

Hi D

I want to create a new list of registrants who show up for the event on the day (currently we type in their details again and again for each weekly event creating a new list each time) I know there must be a way of using last weeks event registration list to make this weeks list by simpler means.

So I guess that the first option you specified is the most appropriate.

Regards

Barry
 
Upvote 0
Hi Barry

sounds like the Combo is the way to go. Well, here's how...

You need 3 tables for this part -- Events, Students, and the linking Enrolments table. Each has its own ID. Enrolments also has StudentID and EventID fields. You can put whetever other fields you need in the tables, but keep them on the topic of the table.
Now for the forms.
First, build an Events form based on the Events table. Leave the bottom half of the form blank for inserting a subform. You'll need the EventID field on eh form or you won't be able to use it for data entry. [frmEvents]
Now build an Enrolments subform with at least the EventID, EnrolmentID and StudentID fields. This should be set to display as a Datasheet. [subEnrolments]
Open frmEvents in Design view, Restore so you can see the database container, and hit F11 to bring the container to the front. Drag the subEnrolments icon onto frmEvents and let go. A subform is created. Right-click the subform to see that the ChildField and MasterField properties both have EventID in them. This synchronises the mian form with the subform. Save and close.
Open subEnrolments in Design view. Change StudentID to a Combo (Right-click the field, Change to | ComboBox). Now go to the properties of the Combo. Click the RowSource property. Click the ... at the end of the line to go to SQL design view. If it's blank, add Students to the grid. Now add these fields:
StudentID
StudentName (you may need to make an expression to join Surname, Firstname)
At least one other descriptive field (Company, for example)
Now go to SQL view in the query. You'll see this --
SELECT something
FROM somewhere;
Change to
SELECT DISTINCT something
FROM somewhere;
This limits the list to one occurrence of each entry.
Back to Design view in the query. Set the sorting to Ascending by the StudentName field.
Close and save.
In the Properties, make sure that the Column Count matches the number of fields you had in the query (3, in the example above).
Column widths should be 0;3;4 (this hides the first key field, and lets you see the others in the drop-down. You'll need a width value for each column in the combo).
List Width should be the sum of the Column widths.
Bound Column should be 1.
Save
Close the subform, open frmEvents and take a look. In the StudentID field, you can select any existing student / registrant from the list. You will need to add students via the Students form before you can enrol them.

Denis
 
Upvote 0
I am in your debt Denis.

Give me a couple of days to make this work and I'll report back.

Regards

Barry
 
Upvote 0

Forum statistics

Threads
1,224,386
Messages
6,178,292
Members
452,836
Latest member
knoharra

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top