View Single Post
  #2 (permalink)  
Old May 21st, 2008, 09:11 AM
rohit_ghosh rohit_ghosh is offline
Authorized User
 
Join Date: May 2007
Location: , , .
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I Have tried modifying the code to the below stated one. But I am still unable to do it. I am getting a Compile error (Invalis Use of Property) at Set Me.Name = rstblCLMasterData!Name Please can somebody help me.....


Private Sub Form_Load()

Dim rstblData As ADODB.Recordset
Set rstblData = New ADODB.Recordset
With rstblData
    .ActiveConnection = CurrentProject.AccessConnection
    .Source = "Select Name, Name FROM tblData"
    .LockType = adLockReadOnly
    .CursorType = adOpenKeyset
    .CursorLocation = adUseClient
    .Open
End With
Set Me.Name = rstblCLMasterData!Name
rstblData.Close
Set rstblData = Nothing

Many Thanks

Reply With Quote