Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual 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 Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old May 8th, 2003, 04:58 PM
Dean Warrington Dean Warrington is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 5 Dean Warrington User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Database Form Problem

I am trying to create a form that has a predictive field that Automatically predicts and completes the name that I am typing, and when I press tab the remaining Address and Postcode fields are automatically completed. All of this information is taken from one table as a source and is to be compiled into another separate table.

The problem I am having is that I can create a predictive field that completes what I type, I can also create VBA that will auto fill the remaining address and postcode fields automatically but I can not make both of these things work together. It seems I must have one or the other. (I must completely type the whole name and press tab to have the Address field and postcode field fill automatically or have the predictive field complete the name I type and enter the Address and Postcode Manually.

My question is
Why will they not work together?

Is there a way around this Problem?

Reply With Quote
  #2  
Old May 9th, 2003, 07:02 AM
epl epl is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2001
Location: Dublin
Posts: 413 epl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 18 m 18 sec
Reputation Power: 8
i don't understand where your problem is - i would expect what you describe to work but can't really help without some sample code

Reply With Quote
  #3  
Old May 9th, 2003, 12:10 PM
Dean Warrington Dean Warrington is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 5 Dean Warrington User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
The Code

Hello EPL

The only way I know to make a field predictive of what I type is by using a Lookup (this is where I think my problem lies.)

This is the code to allow the Auto Fill of Start Location And Start Postcode but this code will not work if the Startpoint was chosen from a Lookup.

Private Sub StartPoint_Exit(Cancel As Integer)
Dim varStartLocation, StartPC As Variant
varStartLocation = DLookup("ADDRESS", "tblPointsInfo", "NAME = [StartPoint]")
varStartPC = DLookup("POSTCODE", "tblPointsInfo", "NAME = [StartPoint]")
If (Not IsNull(varStartLocation)) Then Me![StartLocation] = varStartLocation
If (Not IsNull(varStartPC)) Then Me![StartPC] = varStartPC
End Sub

I have a table called “tblPointsInfo” this is where the information is being referenced from, I also have a table called “Questions” this is where the information being entered into the form is going.

I hope this elaborates a bit more and thank you for your time and effort.

Reply With Quote
  #4  
Old May 9th, 2003, 12:46 PM
epl epl is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2001
Location: Dublin
Posts: 413 epl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 18 m 18 sec
Reputation Power: 8
the easiest / quickest thing to do is to modify your dlookup criteria parameters as follows:
Code:
varStartLocation = DLookup("ADDRESS", "tblPointsInfo", "NAME = """ & strName & """"")
varStartPC = DLookup("POSTCODE", "tblPointsInfo", "NAME = """ & strName & """"")

Reply With Quote
  #5  
Old May 11th, 2003, 06:46 AM
Dean Warrington Dean Warrington is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 5 Dean Warrington User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Many Thanks!

Many Thanks EPL

I managed to locate the problem as being something to do with using a Lookup and not a Combo Box - Since using a combo box in conjuction with the Code everything is working great.

Thank you very much for your time.

Regards Dean

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > Database Form Problem


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

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

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





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway