There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
access audio avg avg 8 bios blue screen boot bsod computer connection cpu crash css dell desktop dma driver drivers dvd email error excel explorer firefox firefox 3 freeze gimp graphics hard drive hardware hijackthis hjt install internet internet explorer itunes keyboard laptop macro malware monitor motherboard network networking outlook outlook 2003 outlook 2007 outlook express pio problem problems router seo server slow sound sp3 spyware trojan usb video virtumonde virus vista vundo windows windows vista windows xp winxp wireless
Software Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Software Development >
VB Function Help


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

 
Thread Tools
Akmorph's Avatar
Computer Specs
Senior Member with 111 posts.
 
Join Date: Nov 2002
Location: MN , USA
Experience: Advanced
25-May-2006, 03:03 PM #1
VB Function Help
Not a pro at this and working with some code that I recieved for a troubleshoot.. not sure if the Edit is throwing this off.. Let me know what you guys can . thank you

Quote:
Public Function FillBlanks()
Set MyDb = CurrentDb
timesthru = 0
Do Until timesthru = 2
If timesthru = 0 Then
Set myTbl = MyDb.OpenRecordset("Select * from DetailData;")
Else
Set myTbl = MyDb.OpenRecordset("Select * from [DetailData-specialists];")
End If
myTbl.MoveFirst

Do Until myTbl.EOF
If IsNull(myTbl!region) Then
region = Lreg
Else
region = myTbl!region
Lreg = myTbl!region
End If

If IsNull(myTbl!DistrHQHCN) Then
DistrHCN = LHCN
DistrName = LName
Else
DistrHCN = myTbl!DistrHQHCN
LHCN = myTbl!DistrHQHCN
DistrName = myTbl!DistrHQName
LName = myTbl!DistrHQName
End If

If IsNull(myTbl!DistrictCodeName) Then
District = LDistrict
districtCode = LDistrictCode
Else
DistrictCodeName = myTbl!DistrictCodeName
LDistrictCodeName = myTbl!DistrictCodeName
LDistrict = Right([DistrictCodeName], Len([DistrictCodeName]) - 5)
LDistrictCode = Left([DistrictCodeName], 4)
End If

If IsNull(myTbl!datasource) Then
region = LData
Else
datasource = myTbl!datasource
LData = myTbl!datasource
End If
myTbl.Edit
myTbl!region = Lreg
myTbl!DistrHQHCN = LHCN
myTbl!DistrHQName = LName
myTbl!DistrictCodeName = LDistrictCodeName
myTbl!DistrictName = LDistrict
myTbl!districtCode = LDistrictCode
myTbl!datasource = LData
myTbl.Update

myTbl.MoveNext
Loop


timesthru = timesthru + 1
Loop
End Function
The Error I get is in the Watch windows
(Expression) .Edit (Value)<Can't compile module>(type)Empty (context) BlankRowProcessing.FillblanksLoc
__________________
AMD Athlon 64 3700+ 2.2ghz
3520MB DDR 3200
ATI X800 XL 256MB DDR2 AGP
Soundblaster Audigy 2 ZS
A8V Deluxe / 10/6/05 Bios
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are Off
Refbacks are Off

You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 12:42 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.