Microsoft Access Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft Access Help

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 February 12th, 2004, 09:54 AM
pinco's Avatar
pinco pinco is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: Germany
Posts: 3 pinco User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Extracting empty text fields

Hi,
I somehow solved the problem of retrieving the last record (field by field) and inserting the data in the new one. In doing I have a problem when the field copied is empty. Here is the code I'm using:

m_instruction = "Select [Master database].Polarization AS Tmp FROM [Master database] WHERE [Master database].ID = " & ID_n 'here ID_n is the last record ID
sql = m_instruction
rs.Open sql, CurrentProject.Connection
Extract = rs![tmp]
[Polarization].SetFocus
[Polarization].Text = Extract
rs.Close

If rs![tmp] is empty the code crashes...
Does anyone have a fast suggestion for taking and writing empty fields?
Thanks for your time!

bye,
Helder

PS: sorry, but I'm really starting with this Access/VB things... argh... too many things !

Reply With Quote
  #2  
Old February 12th, 2004, 10:29 AM
pinco's Avatar
pinco pinco is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: Germany
Posts: 3 pinco User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Sorry sorry....
I solved inserting:

If IsNull(rs![tmp]) Then
Extract = ""
Else
Extract = rs![tmp]
End If


instead of just Extract = rs![tmp]

Thanks anyway!
Bye!
helder

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft Access Help > Extracting empty text fields


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 4 hosted by Hostway