Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old July 26th, 2005, 10:44 PM
jeremy0028 jeremy0028 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Posts: 20 jeremy0028 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 13 m 13 sec
Reputation Power: 0
Scratching my head over this please help

Please see attached zip files I'm creating a insurance database but unlucky at the following.

I been trying link the number of the addin inusrance with the text box called insurance. Example user type #1 and the insurance Blue Cross appears in the txt box. Also been trying to create a double click event procedure whereby user double clicks the text box called insurance to search already entered insurances please help with coding.
Attached Files
File Type: zip Insurance Sample.zip (13.3 KB, 50 views)

Reply With Quote
  #2  
Old July 31st, 2005, 09:40 PM
Slick Willy Slick Willy is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Location: Idaho
Posts: 34 Slick Willy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 h 42 m 14 sec
Reputation Power: 4
Cool Example code

You might try creating a combo box on your screen that looks up the values you are looking for and populates the fields. Set the .visible property for the combo box to false.

on the double click event of the text box write your code to make the combo box visible and the text box invisible.

in the after update event of your combo box, you add in code to make the combo box invisible again and the text box visible.

Dont forget your set focus commands because you cant set the property of an object to invisible while the object has the focus.


The following example uses a text box as you are using currently and is identified as [Account]. I have added a combo box identified as [combo1].

When you double click on the text box it makes the combo box visible, moves the focus and makes the text box invisible. Once you select the option you want from the combo box, it makes the option you selected the current record, makes the text box visible, moves the focus to it, and then makes the combo box invisible.



Option Compare Database



Private Sub Account_DblClick(Cancel As Integer)
Combo1.Visible = True
Combo1.SetFocus
Account.Visible = False
End Sub

Private Sub Combo1_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[Key#] = " & Str(Nz(Me![Combo1], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark

Account.Visible = True
Account.SetFocus
Combo1.Visible = False
End Sub

Last edited by Slick Willy : July 31st, 2005 at 10:16 PM. Reason: Add code

Reply With Quote
  #3  
Old August 4th, 2005, 09:27 PM
jeremy0028 jeremy0028 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Posts: 20 jeremy0028 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 13 m 13 sec
Reputation Power: 0
Thank you

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > Scratching my head over this please help


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT