Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Binding

Status
Not open for further replies.
Sep 22, 1999
76
US
What is the difference between Early and Late binding and what would be the reason for one as opposed to the other
 
<FONT FACE=monospace><br>Dim LateObject&nbsp;&nbsp;As Object&nbsp;&nbsp;&nbsp;&nbsp;' Late binding<br>Dim EarlyObject As Recordset ' Early binding <br></font><br>Access can help you write your code when you use Early binding since it knows that EarlyObject is going to refer to a recordset type object.&nbsp;&nbsp;LateObject can refer to anything.<br><br>Late binding can come in handy when you don't know what type of object will be used until runtime...<br><FONT FACE=monospace><br>For Each LateObject in Me<br>&nbsp;&nbsp;&nbsp;If TypeOf LateObject Is CommandButton Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' process buttons here<br>&nbsp;&nbsp;&nbsp;ElseIf TypeOf LateObject Is Label Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' Label controls don't support all properties<br>&nbsp;&nbsp;&nbsp;End If<br>Next<br></font> <p>Jim Conrad<br><a href=mailto:JimConrad@Consultant.com>JimConrad@Consultant.com</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top