Posting an approved form to database

  • Thread starter Red via AccessMonster.com
  • Start date
R

Red via AccessMonster.com

Good morning all,
I was wondering if anyone knows how I can design a form, once approved, post
to a different database, please let me explain. I have a request form that
users fill out requesting a time slot in a room. This form needs then to go
to an approving official (linked form/table? I think this would work.. any
suggestions?) If the time slot is available, I would like the approver to
have the ability to click button and the information would transfer to his
scheduling database that keeps track of room usage. Is this possible and
would it need to be done in VBA behind a command button? Any help would be
greatly appreciated.

VR,

Red
 
B

Brendan Reynolds

Think in terms of updating a field in a table, not 'posting a form to a
database'. For example, your table might have an integer field with allowed
values of 1 or 2. 1 = requested, awaiting approval, and 2 = approved. Or, if
you want to keep track of the history of requests and approvals, you might
use two date fields, DateRequested and DateApproved.

To separate requests that have not been approved from those that have you
would use queries. For example ...

Using a single integer field called 'Status', select requests not yet
approved ...

SELECT * FROM Requests WHERE Status <> 2

Using 'DateRequested' and 'DateApproved' fields, select only requests that
have been approved ...

SELECT * FROM Requests WHERE DateApproved IS NOT NULL

Using 'DateRequested' and 'DateApproved' fields, select only requests that
were approved yesterday ...

SELECT * FROM Requests WHERE DateApproved = DateAdd("d", -1, Date())
 
R

Red via AccessMonster.com

Thanks Brendan for your help. I will use your suggetions and will elt you
know how I get on. It is appreciated.

Red

Brendan said:
Think in terms of updating a field in a table, not 'posting a form to a
database'. For example, your table might have an integer field with allowed
values of 1 or 2. 1 = requested, awaiting approval, and 2 = approved. Or, if
you want to keep track of the history of requests and approvals, you might
use two date fields, DateRequested and DateApproved.

To separate requests that have not been approved from those that have you
would use queries. For example ...

Using a single integer field called 'Status', select requests not yet
approved ...

SELECT * FROM Requests WHERE Status <> 2

Using 'DateRequested' and 'DateApproved' fields, select only requests that
have been approved ...

SELECT * FROM Requests WHERE DateApproved IS NOT NULL

Using 'DateRequested' and 'DateApproved' fields, select only requests that
were approved yesterday ...

SELECT * FROM Requests WHERE DateApproved = DateAdd("d", -1, Date())
Good morning all,
I was wondering if anyone knows how I can design a form, once approved,
[quoted text clipped - 14 lines]
 
R

Red via AccessMonster.com

Sorry for all the typo's in my last post. I do have a question though, I
have done as you suggested and used an integer field using 1 and 2. Now my
question is, do I use the SELECT function you described to update the fields
in my table when I select the 2(approved)? Do I do this in a procedure ie on
focus, on close or am I way off-course? You talked about using a query,
would I use a query to update my table? Perhaps using an update query?
Sorry for all my questions.

Respectfully,
Red
Thanks Brendan for your help. I will use your suggetions and will elt you
know how I get on. It is appreciated.

Red
Think in terms of updating a field in a table, not 'posting a form to a
database'. For example, your table might have an integer field with allowed
[quoted text clipped - 25 lines]
 
R

Red via AccessMonster.com

Re-post...
Sorry for all the typo's in my last post. I do have a question though, I
have done as you suggested and used an integer field using 1 and 2. Now my
question is, do I use the SELECT function you described to update the fields
in my table when I select the 2(approved)? Do I do this in a procedure ie on
focus, on close or am I way off-course? You talked about using a query,
would I use a query to update my table? Perhaps using an update query?
Sorry for all my questions.

Respectfully,
Red


Brendan said:
Think in terms of updating a field in a table, not 'posting a form to a
database'. For example, your table might have an integer field with allowed
values of 1 or 2. 1 = requested, awaiting approval, and 2 = approved. Or, if
you want to keep track of the history of requests and approvals, you might
use two date fields, DateRequested and DateApproved.

To separate requests that have not been approved from those that have you
would use queries. For example ...

Using a single integer field called 'Status', select requests not yet
approved ...

SELECT * FROM Requests WHERE Status <> 2

Using 'DateRequested' and 'DateApproved' fields, select only requests that
have been approved ...

SELECT * FROM Requests WHERE DateApproved IS NOT NULL

Using 'DateRequested' and 'DateApproved' fields, select only requests that
were approved yesterday ...

SELECT * FROM Requests WHERE DateApproved = DateAdd("d", -1, Date())
Good morning all,
I was wondering if anyone knows how I can design a form, once approved,
[quoted text clipped - 14 lines]
 
B

Brendan Reynolds

The examples I gave using SELECT were examples of how you could use queries
to separate approved from unapproved requests in the same table, rather than
moving data around from one table or database to another. They are general
examples to illustrate the principle.

SELECT queries are used to retrieve data, not to modify it.

You can use an UPDATE query to modify data, but if users are entering data
via bound forms, then I don't see any need for an UPDATE query in this
particular context. I would just bind a combo box or an option group to the
field.

--
Brendan Reynolds
Access MVP

Red via AccessMonster.com said:
Re-post...
Sorry for all the typo's in my last post. I do have a question though, I
have done as you suggested and used an integer field using 1 and 2. Now
my
question is, do I use the SELECT function you described to update the
fields
in my table when I select the 2(approved)? Do I do this in a procedure ie
on
focus, on close or am I way off-course? You talked about using a query,
would I use a query to update my table? Perhaps using an update query?
Sorry for all my questions.

Respectfully,
Red


Brendan said:
Think in terms of updating a field in a table, not 'posting a form to a
database'. For example, your table might have an integer field with
allowed
values of 1 or 2. 1 = requested, awaiting approval, and 2 = approved. Or,
if
you want to keep track of the history of requests and approvals, you might
use two date fields, DateRequested and DateApproved.

To separate requests that have not been approved from those that have you
would use queries. For example ...

Using a single integer field called 'Status', select requests not yet
approved ...

SELECT * FROM Requests WHERE Status <> 2

Using 'DateRequested' and 'DateApproved' fields, select only requests that
have been approved ...

SELECT * FROM Requests WHERE DateApproved IS NOT NULL

Using 'DateRequested' and 'DateApproved' fields, select only requests that
were approved yesterday ...

SELECT * FROM Requests WHERE DateApproved = DateAdd("d", -1, Date())
Good morning all,
I was wondering if anyone knows how I can design a form, once approved,
[quoted text clipped - 14 lines]
 
R

Red via AccessMonster.com

Ok,
I understand now. Many thanks for your help.
VR<
Red

Brendan said:
The examples I gave using SELECT were examples of how you could use queries
to separate approved from unapproved requests in the same table, rather than
moving data around from one table or database to another. They are general
examples to illustrate the principle.

SELECT queries are used to retrieve data, not to modify it.

You can use an UPDATE query to modify data, but if users are entering data
via bound forms, then I don't see any need for an UPDATE query in this
particular context. I would just bind a combo box or an option group to the
field.
Re-post...
Sorry for all the typo's in my last post. I do have a question though, I
[quoted text clipped - 42 lines]
 
Top