Who can solve my Access Form coading problem ?

  • Thread starter Access form problem
  • Start date
A

Access form problem

I am a sales executive . I have to make several visit in a day at different
customer's places .As per my requirement , i have created an small
application to keep database of my visits . I created an table named VISIT &
a auto form in access . The field in my form are DATE(Auto field),
FROM-(Starting point), TO(Destination Point) .Every thing is fine . I make
entry once in a day . Date appears automatically . Then i start with FROM &
TO . My second starting place is last destination . Ex I started from Visit 1
(A to B ) then Visit 2 (B to C )........Visit N (...to A) . I want that when
i make entry for Visit 2 then FROM field should pick the data from Visit 1 ie
B .
 
F

fredg

I am a sales executive . I have to make several visit in a day at different
customer's places .As per my requirement , i have created an small
application to keep database of my visits . I created an table named VISIT &
a auto form in access . The field in my form are DATE(Auto field),
FROM-(Starting point), TO(Destination Point) .Every thing is fine . I make
entry once in a day . Date appears automatically . Then i start with FROM &
TO . My second starting place is last destination . Ex I started from Visit 1
(A to B ) then Visit 2 (B to C )........Visit N (...to A) . I want that when
i make entry for Visit 2 then FROM field should pick the data from Visit 1 ie
B .

1) Date, From, and To are reserved Access/VBA/Jet words and should
not be used as field names.
For additional reserved words, see the Microsoft KnowledgeBase article
for your version of Access:

109312 'Reserved Words in Microsoft Access' for Access 97
209187 'ACC2000: Reserved Words in Microsoft Access'
286335 'ACC2002: Reserved Words in Microsoft Access'
321266 'ACC2002: Microsoft Jet 4.0 Reserved Words'

For an even more complete list of reserved words, see:
http://www.allenbrowne.com/AppIssueBadWord.html

2) Assuming both [From] and [To] are Text datatype fields:
Code the [To] control's AfterUpdate event:

Me![FromControlName].DefaultValue = """" & Me![ToControlName] & """"

You will need to enter the From value once per session. Once you enter
the To value, it will become the default value for the next record's
[From] entry.
 

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