Solved Open a form with selected data from a list field (1 Viewer)

ChristianEhlers

New member
Local time
Today, 11:26
Joined
Jan 6, 2022
Messages
8
Good evening,
I do administer several customers in an acces data base. Sometimes I do have to change some data of the customers.
This needs to be done in a form.

Now I would like to open the form with the right customer. Therefore I think about having another form with a list field. Adter a mouseclick on the right list entry I would like the form for editing and changing the data.

Could anyone tell me the code to use for it?

Thank you very much and best regards
Christian
 

oleronesoftwares

Passionate Learner
Local time
Today, 03:26
Joined
Sep 22, 2014
Messages
1,159
Adter a mouseclick on the right list entry I would like the form for editing and changing the data.
You can have the list box on the same form.

When you place the list box, you will see an option, find a record on my form based on the value i selected in my list box
This will ensure the active record will always be the record corresponding to the listbox you select.

listbox.PNG
 

ChristianEhlers

New member
Local time
Today, 11:26
Joined
Jan 6, 2022
Messages
8
You can have the list box on the same form.

When you place the list box, you will see an option, find a record on my form based on the value i selected in my list box
This will ensure the active record will always be the record corresponding to the listbox you select.

View attachment 97352
Thank you very much for your suggestion.
Unfortunately I cannot have the listbox in the same form as space restriction apply.
Best regards
Christian
 

oleronesoftwares

Passionate Learner
Local time
Today, 03:26
Joined
Sep 22, 2014
Messages
1,159
Unfortunately I cannot have the listbox in the same form as space restriction apply.
Create the other form and name it e.g loadingparameter
add a list box and name it e.g Loadingid
add a command button to open the main form and on the wizard choose show all record
// this is all for the parameter form

//next is a query to filter records
Create a select query e.g
SELECT LOADINGS.LOADING_ID, LOADINGS.yewo, LOADINGS.owapa
FROM LOADINGS
WHERE (((LOADINGS.LOADING_ID)=[Forms]![loadingparameter]![Loadingid]));


then go to the main form and make the query above the form's record source.
 

ChristianEhlers

New member
Local time
Today, 11:26
Joined
Jan 6, 2022
Messages
8
Thank you all, this helps a lot.
I statrted my solution with the suggestion of "pbaldy" and finished it with a code close to the one from oleronesoftwares.

Thanks to all of you
Christian

 

Users who are viewing this thread

Top Bottom