ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Userform to show and update data problem (https://www.excelbanter.com/excel-programming/402444-userform-show-update-data-problem.html)

Pierre[_18_]

Userform to show and update data problem
 
Hi,

I hava an excel sheet with 2 tabs ("summary" and "database")

In "summary" data from the sheet "database" is presented in a nice way.

Because it is a lot of data i want to make a multipage userform to show the
data and give the user the possibility of adding a new record to (or update
in - or delete from) the database sheet.

I created a multipage in VBA.

I then created a listbox that lists all the items in column 2 in the
"databasesheet". This returns a number that is put in a cell on sheet
"summary", cell J6.
Next all cells in the sheet "summary" use the INDEX function to look up and
present the info from the "database" sheet.

On the multipage i would like to also present the info from the cells in the
"database" sheet, like, in excel, is shown on the "summary" sheet.

How should i do that ?
What object should be used to display the info, without overwriting the
"database sheet" ?
How can i make sure the data of the fields shown on the multipage form is
changed when another item is selected from the listbox ?

Please help, i am a novice in VBA.
Thanks,
Pierre



Dave D-C[_3_]

Userform to show and update data problem
 
(Please excuse my questioning your terms -- I want to make
sure I understand, and I'm really ready to be corrected myself
if I'm the one who is wrong)
I hava an excel sheet with 2 tabs ("summary" and "database")

A tab is a sheet (right?) So you have a workbook with 2 tabs/sheets.
want to make a multipage userform

You want a multipage control on a userform?
On the multipage i would like to also present the info from the cells in the
"database" sheet, like, in excel, is shown on the "summary" sheet.

Instead of having a multipage, how about presenting just the
info selected from the listbox right on the userform. Use textboxes
where you want to allow updates. Use labels (with light BackColor)
otherwise. You would fill in the fields when a selection is made
from the listbox. Then maybe buttons to
1) accept the "UPDATE" into the "database" sheet; or
2) "ADD" a new record (maybe clear fields), or
3) "DELETE" the selected record, or
selecting another entry in the listbox would present another
database record. (Or is there a DB control just for this?)
Just an idea, Dave D-C

"Pierre" wrote:
I hava an excel sheet with 2 tabs ("summary" and "database")

In "summary" data from the sheet "database" is presented in a nice way.

Because it is a lot of data i want to make a multipage userform to show the
data and give the user the possibility of adding a new record to (or update
in - or delete from) the database sheet.

I created a multipage in VBA.

I then created a listbox that lists all the items in column 2 in the
"databasesheet". This returns a number that is put in a cell on sheet
"summary", cell J6.
Next all cells in the sheet "summary" use the INDEX function to look up and
present the info from the "database" sheet.

On the multipage i would like to also present the info from the cells in the
"database" sheet, like, in excel, is shown on the "summary" sheet.

How should i do that ?
What object should be used to display the info, without overwriting the
"database sheet" ?
How can i make sure the data of the fields shown on the multipage form is
changed when another item is selected from the listbox ?




All times are GMT +1. The time now is 12:46 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com