Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

Value of Field is Global Variable

$
0
0
Hi Everyone,

I am creating a db where users enter Proposal information, and under the same proposal, there are several revisions with differing data. The 2 tables are linked.

When the user presses a CREATE REVISION button, the new form (Revision Form) opens where people can enter the new data. On this form, and also in the Revisions table, I have placed a ProposalID field which should take the ProposalID value from the Proposal Form. At first, I had the DefaultValue of the ProposalID equals to the ProposalID from the Proposal Form. It worked. However, several forms also lead to this Revision form and so the Defult value taken from 1 previous form is not enough..

Long story short, I assigned a global Variable in a module, and when the user presses CREATE REVISION, the variable copies the ProposalID and Opens the New Revision form, and copies the value in the ProposalID field there. It's not working.. The field shows blank.

Module:

Global PropID

On CREATE REVISION:
PropID = Me.ProposalID.Value
DoCmd.Close acForm, Me.Name
DoCmd.OpenForm Form_SCNewWWF.Name, , , , acFormAdd
Form_SCNewWWF.ProposalID.Value = PropID

I hope I didn't complicate things. Anyone knows what is wrong here?

Thanks!!

Randa

Viewing all articles
Browse latest Browse all 13329

Trending Articles