Default value equals same value in another field in the same table

  • Follow


Is there a way to automatically populated a field when another field in the 
same table gets a value.  For example, I have the fields AMOUNT_DUE and 
CURRENT_VALUE.  When a value is placed in the AMOUNT_DUE field I want that 
same value to automatically populate the CURRENT_VALUE field.  Is that 
possible without running a query or macro?

Thanks,
Akilah
0
Reply Utf 1/17/2008 2:24:00 PM

Akilah,
   Well, usually Amount_Due is a calculated field (ex.=Price * Qty), but if 
Amount_Due is entered manually, you would use the AfterUpdate event of 
Amount_Due to...

Private Sub Amount_Due AfterUpdate()
    Me.Current_Value = ' your calculation here...
End Sub

Or, create a Macro using SetValue to calculate Current_Value

    But, if... given any Amount_Due value, if you can always recalculate 
Current_Value (on the fly), then you shouldn't be storing Current_Value at 
all.
-- 
    hth
    Al Campagna
    Microsoft Access MVP
    http://home.comcast.net/~cccsolutions/index.html

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

"Akilah" <Akilah@discussions.microsoft.com> wrote in message 
news:0BD145B4-E3D8-4DBD-B5BB-7950CFF06560@microsoft.com...
> Is there a way to automatically populated a field when another field in 
> the
> same table gets a value.  For example, I have the fields AMOUNT_DUE and
> CURRENT_VALUE.  When a value is placed in the AMOUNT_DUE field I want that
> same value to automatically populate the CURRENT_VALUE field.  Is that
> possible without running a query or macro?
>
> Thanks,
> Akilah 


0
Reply Al 1/17/2008 5:05:12 PM


1 Replies
1257 Views

(page loaded in 2.58 seconds)

Similiar Articles:
















7/24/2012 11:21:32 AM


Reply: