Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / March 2005

Tip: Looking for answers? Try searching our database.

How do I write code for ... If this field is blank, Then go to X F

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
M1chelle - 30 Mar 2005 21:57 GMT
and alternatively, if X field is "anything", then go to 1 Field?

I'm trying to make this as simple as I can.  After five hours of trying to
figure this out, I'm desperate.  I'm trying (for the first time) to use VB to
create a template for a Preprinted Purchase Order form I have.  I've scanned
the form into Word 2003 and using Tables, I've created the needed Form
Fields.  I've renamed the formfields for ease determination of what's what...

I need to say, IF BkAcct1 = "Blank", then Goto BkQty1.  If not blank, it
needs to  go to BKAcct2.  

Can Anyone PLEASE Help me???
Mwilliams@swdahsv.org
Thanks,
Greg Maxey - 30 Mar 2005 22:43 GMT
Run something like the following as an on exit macro from BkAcct1

Sub ScratchMarcro()
Dim oDoc As Document
Set oDoc = ActiveDocument
If oDoc.FormFields("BkAcct1").Result = "" Then
  Selection.GoTo What:=wdGoToBookmark, Name:="BkAcct2"
 Else
  Selection.GoTo What:=wdGoToBookmark, Name:="BkQty1"
End If
End Sub

Signature

Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.

> and alternatively, if X field is "anything", then go to 1 Field?
>
[quoted text clipped - 11 lines]
> Mwilliams@swdahsv.org
> Thanks,
M1chelle - 30 Mar 2005 22:49 GMT
Greg thank you for your reply... I'll do my best to make this work for me : )

> and alternatively, if X field is "anything", then go to 1 Field?
>
[quoted text clipped - 10 lines]
> Mwilliams@swdahsv.org
> Thanks,
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.