Form-Query-Entry Question

C

Cardinal

I have a room reservation app that is shaping up OK but it still has
some things that I would like to improve on. I have created forms for
each of the computer rooms in our organization. The rooms are DLR1,
DLR2, and a few others. The form entitled DLR1 pulls information from
a Query called DLR1. The DLR1 Query pulls only records for room DLR1.
So far so good. When the user sees the form called DLR1 they are
seeing the appropriate records for that form.

The problem comes when the user *enters* a record into that form.
Unless they specify "DLR1" for the location, it doesn't record it as
the DLR1 room. Since that form is displaying only DLR1 records, it
appears to the user as a redundant and unnecessary entry. I can see
why it is necessary to specify a room because MS Access doesn't know
what room it goes in unless it is told. But to the user it looks like
an unecessary step. Is there a way to overcome this? I hope this was
clear. Thanks.

Here's a link that shows what I am trying to describe.

http://209.200.80.147/Test/Ascreen.html
 
J

John Spencer

Well, since you have unnecessarily created a form for each room (at least in
my opinion) then you can set the default property of the control for the
location to "DLR1" (or the correct value for each form).

That way when a new record is entered the value will automatically be filled
in on the record.

If you don't want the user's to be able to change the value then lock the
field. Of course it would be a lot easier if they needed to shift an event to
another room if they could unlock the field and change the room.

You appear to be using datasheet view for entry and display. That works well
in some cases, but it limits the control you have over what happens.

John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
 
C

Cheese_whiz

Hi Cardinal,

So it sounds like your table has a field to store the rooms in, but you just
don't want users to have to specify a room when they are working in a form
that makes the room 'obvious' (at least to them.....the users).

If that's the case, you can just add a hidden control on your form (add a
control, set it's visible property to 'no'), and have that control's default
value property specify the room associated with the form in question.

HTH,
CW
 
C

Cardinal

If that's the case, you can just add a hidden control on your form (add a
control, set it's visible property to 'no'), and have that control's default
value property specify the room associated with the form in question.


When I set visible to "No" in a standard form it works fine and hides
it.
When I try it in a data sheet it doesn't seem to work. Is it possible
that the datasheet doesn't allow that feature?
 
W

Wayne-I-M

Hi

To follow on from John's post.
Can I make a suggestion - you're not going to like it so take a seat :)

Create a new database
You don't need to delete the one you already have - you can import the date
from it later.

1st (most important)
work out just what you want your database to "do".
2nd
construct it with this in mind.
3rd
Frget your forms (for the moment)
Create some tables
eg.
You need a table for rooms (just one)
RoomID = Autonumber
RoomNumber = Text
RooLocation = text
etc
etc

Next Table
tblEvents
EventID
EventDate
EventStart
EventEnd
EventContact1stName
EventContact2ndName
EventContactTelNo
EventContactEMail

3rdTable
tblBookings
BookingID
RoomID
EventID
BookingDate
BookingCost

Next link these tables (many to many) in the relationships window

Create a query (bring in th 3 tables and only the information you need for
your form)

Use the wizard to create the form(s)
Main form = Booking
Subform1 = Event
Subform = room

Good luck with your app. Post back if you have problems.

Don't forget access is a relational application - data is "related"
 
C

Cheese_whiz

Hi Cardinal,

Sorry, but I wasn't clear you were using a datasheet. I got into the habit
of using a continuous form setup to look like a datasheet when I wanted that
kind of presentation. You get more flexibility that way.

CW
 

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