Still having problems with building a Database

L

Logan

I posted the following the other day:
I would like to start to build a database of persons
details within my workbook template.
My idea is that each time Sheet1 is filled out, the persons
details (ie Surname, Given, DOB, Address, etc.) populates
to a database sheet that is hidden sheet in the workbook.
When the person is done filling out this sheet it gets
saved as an xls in another folder. This done with a macro.
I would like the database sheet, with this persons details
to stay in the template and each time the template is used
it stores the persons details, thereby building the
database within the template.
In the future I would like to be able to query the database
prior to filling out the sheet to see if the person is in
the database. If the person is there I would like to import
their details in the sheet.

Is this possible. If so can anyone point me in the right
direction.

Mark had given me the following example:

Private Sub cbAdd_Click()
Dim lRows As Long


With Range("Database")
lRows = .Rows.Count + 1
Range("A2:AH2").Copy Destination:=.Cells(lRows, 1)
.Resize(lRows).Name = "Database"
End With
End Sub

The problem is that the Input cells get filled from another
sheet, they are referenced to another sheet (ie
='Sheet1'!J4). Everytime I run Mark's example, all it does
is does is copy 'Sheet1'!J4 and change it to 'Sheet1'!J15
and place it into the Database table. Run it again it adds
'Sheet1'!J16 and so on.

Any help would be appreciated.
 
B

Bob Phillips

Logan,

You seem to be making a simple exercise very complicated. Excel has a
built-in forms feature, which simplifies the creation and maintenance of
this sort of data, and John Walkenbach has an even better utility at
http://j-walk.com/ss/dataform/download.htm

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top