|
-
Jan 31st, 2000, 11:22 PM
#1
Thread Starter
Lively Member
I am trying to connect this combo box with textboxes so that when something is selected then its info will be filled in the textboxes, Easy. OK well my text boxes are not changing with my diff selections. I included a piece of code below to show what I have. I also am trying to include an SQL statement somewhere that when say the Name is selected from the combo box it hooks to the indexID in its table that is apart of its relations to other tables. Any further suggestions on any of the above. Thankyou.
Private Sub cboAuctions_Change()
Dim db As Database
Dim tb11 As Recordset
Set db = DBEngine.OpenDatabase("S:\Dbapps\Repo\RepoInv", False, False)
Set tb11 = db.OpenRecordset("Auctions")
If tb11.RecordCount > 0 Then
tb11.Edit
tb11!Auctions = cboAuctions.Text
tb11.Update
Else
MsgBox "No record Found"
End If
' Fill in textboxes with info that matches selection
If IsNull(tb11!AuctionAddress) = True Then
txtActnAddrss.ForeColor = vbRed
txtActnAddrss = "Input"
Else
txtActnAddrss.ForeColor = vbBlack
txtActnAddrss.Text = tb11!AuctionAddress
End If
tb11.Close
db.Close
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|