UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Auto Fill Next Field, Office 2010    
 
   
BIGMACBEN
post Mar 9 2012, 05:30 AM
Post #1

UtterAccess Member
Posts: 23



hi all, i have two fields [position] and [approved] , (position is a lookup), what i want is for [approved] to display a set text based on what is selected in [position] field , eg [position] displays "3G" then [approved] update and show " 1G/3G", ( i think this might have to be vba code and added to the " on update property" if so can you show me the code for this please?
Go to the top of the page
 
+
jleach
post Mar 9 2012, 05:47 AM
Post #2

UtterAccess Editor
Posts: 6,711
From: Capital District, NY, USA



Hi,

Try the AfterUpdate event of the position Control:

CODE
Private Sub ctlPosition_AfterUpdate()
  If Me.ctlPosition = "3G" Then
    Me.ctlApproved = "1G/3G"
  End if
End Sub


Note that when working with forms, there's a underlying recordset (the fields/data), and there's controls that are bound to those fields. The Controls are where you do this stuff, they're the ones with the events, the fields are just part of the recorsource.

hth
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 19th May 2013 - 03:59 PM