Creating forms on the fly?

G

glinch

Hi there, hopefully somebody will be able to offer me some words of advice.

I am creating a database for a firm that deals with property insurance claims.
Creating a databse of relevant contacts etc ... is not a problem.

The current system that the company uses is that of an excel spreadsheet,
where the details for each room are recorded and relatively simple
calculations are carried out on this.

The details needed for each room are the same (ie height, width, damage floor
etc ...), the variation being for each claim being how many rooms.

My intention is to move the system completely over to access, and avoid
attaching spreadsheets to records etc...

Ideally I would like to be able to creat a form where the user would select
the number of rooms (e.g 1 sittingroom, 2 bathrooms, 3 bedrooms) and the form
would then on the following stage request the relevant data eg

Sitting room:
height, width, etc..

bathroom1:
height, width, etc..

bathroom2:
height, width, etc..

bedroom1:
height, width, etc..

bedroom2:
height, width, etc..

bedroom3:
height, width, etc..


Is it possible to do this dynamically so to speak?

Would any one have any recommendations? Should I go down this route or stick
to the old system?
 
T

Tom van Stiphout

Yes, this is fairly simple, since relational databases already want to
work this way. Each room will become a record in a table:
tblRooms
PolicyID FK long int required
RoomTypeID FK long int required
RoomDescription text255 required
Height single required
Width single required
etc.

The user can simply add a new record for the current policy, select
the room type, and fill out the other fields.

In a more elaborate system I wouldn't be surprised if there were
fields that only pertain to a single room type; they could perhaps go
in separate tables linked to the main table 1:1.

-Tom.
Microsoft Access MVP
 
A

Al Campagna

glinch,
What do you mean by "dynamically", as opposed to a main form
based on a building info (the ONE), and a continuous subform based on room
info (the MANY)
--
hth
Al Campagna
Microsoft Access MVP 2007-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
G

glinch via AccessMonster.com

Hi there folks thank you for the responses,

Al thanks for the heads up on the other forum, didn't see it as a problem
before but no i certainly do, lesson learnt.

With regards to the data model I was looking at along something like this

table for client:

tblClient:
---------
ID - primary key
name - text
address - text
etc..

a client can have many claims

tblClaim
---------
ID - primaryKey
clientId - longInteger
causeOfclaim - text
noOfBedrooms - integer
noOfSittingRooms - integer
noOfToilets - integer
etc... for each type of room

a claim can have many rooms that are damaged.

tblRoom
---------
ID - primarykey
claimID - longinteger
roomDesc - text, bathroom, bedroom etc...
height - number
width - number
damageToWalls - number %
damageToCeiling - number %
etc...


and this is the kind of tricky part. Calculation values, these would in
theory need to be constants. Each room would have these calculations used,
but would need the ability to change these as and when for each individual
room.

tblCalculations
----------
Id-integer
description - text
rate - Currency value

I suppose what I would probably do is create fields in the tblRoom to include
the calculation fields, and populate these from tblCalculations eg:

tblRoom to include
---------
calc1Desc
calc1Rate
calc2Desc
calc2Rate
calc3Desc
calc3Rate
etc..

I could edit these then per room. Does that sound like the correct way to
model the data?? Tom I think that is they way you are suggesting?



Now, going on to what i'm trying to describe as dynamically creating the form.


If for example I enter 3 bedroom, 1 bathroom.

I would then like to move to a following form to enter the data for all 4
rooms. This form would essentially be the same form repeated 4 times, so that
the info could be added for each room.
The form would dynamically be created from the values given for the number of
bedrooms/bathrooms etc...

Hopefully that make sense,Sorry if my explanation is confusing?

Do you think I am tackling this in the right way?? Any feedback is greatly
appreciated, thanks for taking the time out.

Cheers

Noel
 

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