467,912 Members | 1,752 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,912 developers. It's quick & easy.

link problem with sourcecode.....

Oke Guys,

I need some help with VB6.0 and MSACCESS

I've a table in a mdb file with



TABLE: Clients
Company|Street|ZIP etc

Then I have a Form named FrmAdres with lots of controls.

What do i want.

On Form_Load loop all the controls (textbox, combobox) search in the table
Structure and look for the source. Then goes to the correct table and field
and fill the control with that information.

This must be a public function...I only need the part to 'link' the
information...Loop the controls, get objectnames, match them in Table
structure is not the problem...only the last part.

Public Function VulForm(FrmName as Form)

With rstClients

Do while not .eof

If !CLIENTID = SearchClient then
exit do



end with

End With

With rstStructure

.Open "Select * from STRUCTURE", Tn, adOpenStatic, adLockOptimistic
End With

Dim ctlname As String
Dim frm As Form
Dim ctl As Control
Set frm = FrmName

For Each ctl In frm.Controls
With rstStructure


Do While Not .EOF

If !Formname = frm.Name Then

If !Objectname = ctl.Name Then


Ctl.Text = ??????????????????????

End If

End If



End With

End Function

Jul 17 '05 #1
  • viewed: 1073

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

12 posts views Thread by Mark Buch | last post: by
2 posts views Thread by Torben Madsen | last post: by
16 posts views Thread by Lucas J. Riesau | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.