Multiple userForms maintaining data integrity

Daragh_K

New Member
Joined
Mar 7, 2015
Messages
5
Hi,
Hoping someone could advise me here.

I have an execl spreadsheet preloaded with data on multiple sheets.
I am currently using multiple userForms to display the data.
On userForm1 i have two listboxes.
I move values from listbox 1 to listbox 2 using a button called 'Select_cmd'.
Prior to the selected record value moving to listbox 2 a second userForm pops up where I populate
other fields on that record using radio buttons.

How do i ensure that i am updating the correct record using the second userForm?

Does anyone have advice on how to use multiple forms and maintain data integrity?

Thanks
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
sounds like a need for a unique record key, that can then be referenced against
 
Upvote 0
Thanks royUK,
I'm already using multipage control for other functionalities.
I need a 'pop up' that allows a user to simply select radio buttons, which in turn populate the same record selected on the list available on the first form.

If you think of anything, please let me know
 
Upvote 0
Yes ideally I would do it in a database, but unfortunately I'm restricted to excel.
I may assign a unique id for each record and query each time a selection is made on the list of form 1.

I thought there might be a way to access the selected record via form1 and populate the cells for that row.
It far easier to do this type of thing in the Object oriented world

Thanks for your help
 
Upvote 0
Are the multiple forms essentially the same, the only difference being the sheet they are used with/for?
 
Upvote 0
Are the multiple forms essentially the same, the only difference being the sheet they are used with/for?

Form one shows two listboxes, "Available" and "Selected". The "Available" listbox is populated from worksheet("Test") a range of A2:A500.
On selecting the value in 'Available' list box and clicking a cmdbutton named 'select', form2 pops up with several frames. Each frame has radio buttons asking what level of detail is required for the selected record.

On selecting the values on form2 I want to populate the remaining cells in that particular row, i.e. B2:P2

To put it another way:
1) I am looking to grab a record (row) in form one by selecting from a listbox and clicking a button,
2) I want to be able to enter/edit the cell values in that 'grabbed' row and save back to the same worksheet via a different 'popup' form

I hope that makes sense.

Thanks for your response :)
 
Last edited:
Upvote 0
You could store the row you've grabbed the record from in a hidden textbox and use that when you want to write back the edited data.

If you are working with more than one form each one could have a similar textbox and you would populate it as you moved between the forms.
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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