Selasa, 31 Maret 2015

Re: [MS_AccessPros] Default Value Issues

 

Bill-


In AfterUpdate of RatNonSmoker, do:

Me.RateSmoker = Me.RatNonSmoker

Love your field names!  (A non-smoker is a rat?)

John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
SQL Queries for Mere Mortals 
(Paris, France)




On Mar 31, 2015, at 7:13 PM, 'Bill Singer' Bill.Singer@at-group.net [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:

I have a table that tracks health insurance rates.  There are separate rates for non-smokers and smokers.
The table looks something like this
 
RatRatID              Auto Id
RatHpnID             FK to the Employer Group because Employers are the ones who buy the policy
RatAgeID             FK to an Age Band table because rates are by age band
RatNonSmoker this is where the non-smoker rate would go.
RatSmoker          this is where the smoker's rate would go.
 
I have a continuous form the looks like a spreadsheet where these rates are typed in. 
 
The first 3 fields are auto input so there is no visible field on the form.  The form only has 2 field per record.
 
The 4th and 5th fields have to be typed in.  Most of the time the RatSmoker is the same as the RatNonSmoker.   I would like the RateSmoker field to default to the RatNonSmoker.  I have tried and failed a few times to get the default value of the RateSmoker field to be the same as the RateNonSmoker.
 
Could someone point me in the right direction?  This would cut our manual input in half.
 
Thanks,
Bill
Minnesota
 

__._,_.___

Posted by: John Viescas <johnv@msn.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)

.

__,_._,___

Tidak ada komentar:

Posting Komentar