Continuous forms coding suggestions needed.

A

Aldred@office

Hi Access Gurus.

I would like to develop something like this:

A continuous mainform which is controlled by some input boxes was created.
I had a button to display the details on that partically transation. This
is the example:

Form A
PO# Part# Quantity Delivered DueDate
4729 06565 20000 9000 9/18/2009
4729 07284 14000 10000 9/18/2009

When I click say the one with part# 06565, then Access Popup a subform with
these
Form B
Part# Delivery# DeliveredQuantity DeliveryDate
06565 1999 5000 9/13/2009
06565 2019 4000 9/17/2009

I need two operations here:
1) Add another delivery transaction to the Form for example

2) Edit the current records in case of something wierd happening.


My strategie was that I create a main continuous form and display Form A's
records. A button will be made, when press that, I have a command to open
the subform:

DoCmd.OpenForm strForm, acNormal, , " PartNum='" & Me!PartNum & "' And
POinNum='" & Forms!fHome!POinNumDelivered & "'", , acDialog


Here comes the problems.

For the Form B, if I use continuous form, I cannot create a button say
add/edit then popup another subform for me to process. Moreover, I found no
way to populate the data I wanted from SubForm B then transfer them to the
new subform. The DoCmd.OpenForm only could transfer the Where clause which
I couldn't fetch them in the form for processing.

A ListBox will also work in displaying the records in form B, however, the
DoCmd.OpenForm from Form A where clause cannot transfer to SubForm B. So,
SubForm B's list box will just display all the records without filtering the
Part# and PO#.

Can some one please point me out about what could I do in such a case?

Thanks.
 
B

BruceM via AccessMonster.com

A few things strike me here.

First, you are listing the PO# separately for each line item (record) on
FormA. You should have a main PO table, with a related table for line items.

Second, a continuous form cannot have a subform. However, you seem to be
describing a pop-up FormB as a separate form rather than a subform.

It sounds as if you want to open yet another form from FormB, but for what
purpose is unclear.

Part of the problem in understanding the questions is that you are describing
the forms rather than the underlying structure. Another obstacle is not
understanding the real-world situation. For one thing, are the quantities of
things you have ordered or things you have sent? Apparently the quantity
(9000) shown as delivered on FormA was delivered in two separate installments,
and 11,000 are still not delivered. It should be possible to suggest a
structure once there is a little more information.

This article shows some ways of handling continuous forms so that a
continuous main form can show, essentially, a continuous subform for the
current record. It has some other very cool stuff about continuous forms,
too.
http://www.members.shaw.ca/AlbertKallal/Articles/Grid.htm
 
A

Aldred@office

I forgot to put down the table structure. It should be more helpful if it
is there. :)

Right now the problem is not the table structures, it is the UI. If I put
the numbers (including the ID keys) manually, the query result is just what
I expected. ;>

And I thought subform and popup form are the same thing and now I know it
actually is not. I used to develop Asp/ asp.net and I am having a hard time
in adapting Access UI disign.

To make my question simplier. Maybe I should say more direct like this:

How could I make the data which was fetched from the continuous form to
transfer to another form for further process?
If I use
DoCmd.OpenForm strForm, acNormal, , " PartNum='" & Me!PartNum & "', ,
acDialog
PartNum will only be appeared in the where clause which I can't touch it
anywhere from the transfered form.

I hope this time it is a little more clear.

Thanks Bruce.
 

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