Referencing a field from other windows w/ VBA Modifier

Let's say I have Window1 and Window2.  I've written code in Window1 that 
needs to change a field in Window2.  I've tried each of the following lines 
on their own and none of them have worked.

This Subroutine exists in Window1, not Window2.

Private Sub Button_Changed()
    Great_Plains.Window2.UserDefined.Value = 999               //first try
    Great_Plains.Window2.UserDefined.Value = "some value" //second try
    Great_Plains.Window2.UserDefined.Focus (999)               //third try
End Sub

Is this possible?

Phil
0
Phil1 (164)
9/21/2005 10:06:02 PM
greatplains 29623 articles. 6 followers. Follow

1 Replies
603 Views

Similar Articles

[PageSpeed] 54

Yes it is possible.

You only need Window2.FieldName.value = "".

The caveat is that the window has to be open (unless you're writing to a 
public variable and not a field) and it has to be within the same series 
(which it would appear to be).

The problem is likely that you're using the button_changed event. Use the 
Button_BeforeUserChanged Event.


"Phil" wrote:

> Let's say I have Window1 and Window2.  I've written code in Window1 that 
> needs to change a field in Window2.  I've tried each of the following lines 
> on their own and none of them have worked.
> 
> This Subroutine exists in Window1, not Window2.
> 
> Private Sub Button_Changed()
>     Great_Plains.Window2.UserDefined.Value = 999               //first try
>     Great_Plains.Window2.UserDefined.Value = "some value" //second try
>     Great_Plains.Window2.UserDefined.Focus (999)               //third try
> End Sub
> 
> Is this possible?
> 
> Phil
0
YCI (25)
9/22/2005 1:49:03 AM
Reply:

Similar Artilces:

How do I increase query field length (>20 characters) ?
I want to exclude 3 or 4 variables from a particular query. Using Not "xx"or"yy" is fine, but when excluding more than this, query fails. I think the problem is that the total text characters is quite large (approx 60 characters in total, from four exclusions). Ideas, please ? 60 characters is not the limit. 1024 characters is the limit. POST the SQL of the query that is not working (View: SQL on the menu) or at a minimum post what you are attempting as the criteria. Also "query fails" does not tell us if you get an error (what is it) or the wrong resul...

Password Protection doesn't interop between Office for Window and Office for Mac 2004
I have an excel file that was created in Office for Windows and certain cells were password protected. When I open that same file with excel for Mac the password protection doesn't work. I tried tools>unprotect> .... I plug in the password and no luck. When I open that same excel file with another windows machine with Office for windows I'm able to access the protected cells after entering the password. Is this a known issue? Is there a fix for office for mac? I'll be forced to buy a windows version of office which would make the mac version useless. I'm currently r...

Changing a text field to a date field
Hi I know this is a problem for lots of people but I still cant find an answer. I have imported a text file into excel with a number field that displays credit card expiry dates as a 4 digit number. example 0408 so month + year. I have converted the number field to a text field so it doesnt drop off the first zero and now I need to convert it to a date field. Any nice easy simple ideas. Any help would be much appreaciated. Or direction to a question the same. Perhaps =DATE(100+RIGHT(A1,2),LEFT(A1,2),1) format as date -- daddylonglegs --------------------------------------------...

my brain not comprehending the yes/no field
I have a db that enters orders. The "product" (insurance plan) has one price but 20 different "attributes" in any combo of one choice to many (plan types like medical, dental etc...) and with one "price" (premium). The plan types must show up on one line in a report with one price (they are not deliminated per plan type). The easiest way for personnel to enter all the plan types would be yes/no check boxes on the input form. My problem is I can't figure out how to make those "yes"es equal the plan name in the report! I know, it's proba...

Transfer Files Using VBA
Hi, I'd like to transfer files from several drives on my pc to one cetnral location. From A:\Office1\ B:\Office2\ C:\Office3\ To D:\HeadQuarters\ My routine now is the following 1) Copy the files from drives: A, B, and C; and then 2) Paste the filesto the D drive 3) Delete the files permanently from drives A, B, and C. As you see this is a tedious routine, which I'd liket o avoid by using VBA. Can someone start me off with some code on how to accomplish this. Thanks so much in advance! Jrew Jrew, You could create a batch file (from the olden days) using XCOPY and desired bel...

Long delay in opening New Message windows
My Windows mail has recently developed the problem of taking 10 seconds or more just to open a create new message window. How do I fix this? Did you add any 3rd party software into the Add Ins -- Peter Please Reply to Newsgroup for the benefit of others Requests for assistance by email can not and will not be acknowledged. "Jembeaux" <Jembeaux@discussions.microsoft.com> wrote in message news:A58C3591-9431-4BDF-8D32-9ACE1E12D41E@microsoft.com... > My Windows mail has recently developed the problem of taking 10 seconds or > more just to open a create ne...

How to show the month of the referenced cell (containing a date)
If a cell holds the date "2/1/08", what formula can I use that will give me the following result: "Feb - 08" I tried =Month(a2)......but I just get the number of the month. Thanks. =TEXT(A2,"mmm - yy") Or simply =A2 with the cell custom formatted mmm - yy HTH. Best wishes Harald "Dave K" <fred.sheriff@gmail.com> skrev i melding news:165b03da-19ba-40b8-b9fe-77b17ef045b5@d45g2000hsc.googlegroups.com... > If a cell holds the date "2/1/08", what formula can I use that will > give me the following result: > > "Feb - 08&...

VBA problems
Hello, I just started messing around with VBA and I got something approaching what I want (what I want is to highlight a row based on a value in the 1st column). This is highlighting the wrong row though! It looks like all the numbers are correct... for instance, when I step through it, I'll get the correct row selected but a different row highlighted! Please shed some light on this! It's quite frustrating. ' first column has dates from 12/2003 to 12/2006 Private Sub Worksheet_Activate() Const Yellow = 6 Dim row As String Range("A1").Select Do While...

Infopath w/ manually entered values in drop-down and qry results
I had originally posted this elsewhere, but was told this forum is the appropariate plase. I have an Infopath form with a drop-down listbox, that is poulated with manually-entered values. I choose a value, submit the updated data, and it does put the correct value in the SQL 2005 database. However, the next time I query the data, the value in the drop-down list box is the default value for the list-box, not the value from the database, which is misleading. I would have expected the drop-down listbox to display the value from the database instead. Thanks. On Tue, 4 Sep 2007, in...

Windows Live mail not downloaded into Outlook
I have an msn account, Outlook 2007, and Outlook connector installed on a Vista machine. Recently I've had problems downloading mail to Outlook. Outlook Connector shows that Calendar and Contacts are connected, but that there is an error in connecting mail. The error message says: Error in Mail Error with Send/Receive. Look for a log in the Sync Issues folder. Not sure where the Sync issues folder is. This has occurred at least three times in the past month. Once, I deleted my msn profile and started over, but I can't figure out why it occurred or how I was able ...

Windows Live Video Chat
I have a laptop that has an integrated webcam and microphone. Well I was trying to call a friend over Windows Live Messenger and the webcam works just fine. What doesn't work is the microphone. And I don't know why. Someone help please? Any suggestions? Answers? "Wicked Sin" <WickedSin@discussions.microsoft.com> wrote in message news:B3555EA6-82B4-4831-B70F-1FE3206CB3CD@microsoft.com... > I have a laptop that has an integrated webcam and microphone. > > Well I was trying to call a friend over Windows Live Messenger and the > webcam wor...

does publisher 2000 run on windows xp?
thanks for helping if you know the answer Yes, all versions of Publisher run on XP, Publisher 1.0 maybe the exception. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "Baudouin" <Baudouin@discussions.microsoft.com> wrote in message news:6AA35200-15D7-47F2-8471-4E6737171B6A@microsoft.com... > thanks for helping if you know the answer Mary Sauer <gsauer@mycolumbus.rr.com> was very recently heard to utter: > Yes, all versions of Publisher run on XP, Publisher 1.0 maybe the > exception. It runs. Not on...

Mouse scroll not working in Module window
Access97 on HP Laptop on XP Pro Since installing Office 97 on my new (replacement) laptop I find the mouse scroll button does not work in the Module window - works everywhere else in Access ok? Any ideas appreciated. Piri yeah don't use ancient software, kid "Piri" <wiremu.pareiha@hotmail.com> wrote in message news:1178247184.740213.222110@y5g2000hsa.googlegroups.com... > Access97 on HP Laptop on XP Pro > Since installing Office 97 on my new (replacement) laptop I find the > mouse scroll button does not work in the Module window - works > everywhere else i...

*CANT log into Windows -please help
Hi, I need step by step instructions on how to use my recovery console CD in order to fix a problem. Here is my prob: A virus/malware scan I did probably messed up my logon file. The antivrus program either removed or quaranteined the virus/trojan that was attached to my logon file. Because when AVG prompted me to reboot after this scan, It stopped at the welcome screen logon part. I click on my user name (only one there) and it says its logging on...But then it says saving settings and nothing else happens. My machine does not reboot or anything. It just stays at this logon sc...

Windows Mail spelling control Dutch
Spelling control of my Windows Mail (Version 6.0.6000.16386 / Vista_rtm.061101-2205) is presently limited to English, French, German, Spanish. I want to include spelling control for Dutch. I received below advise, but after donwload and installation of the most recent version of Wlndows Live, no upgrade to below mentioned latest version has happened, nor is there a complement of 37 spell check languages. ********************** Make sure you have the latest version (14.0.8089.0726), and you have to be online to see the full complement of 37 spell check languages. ****************...

Adobe Flash Player and 64 bit Windows 7
I am trying to view the Lulu demonstration but cannot. I am using Windows 7 and IE 64 bit and apparently I need to run the 32 bit to see the demo. I don't know how to. Any help would be appreciated. John, For the time being there is no 64-bit flash player for IE 64-bit. http://kb2.adobe.com/cps/000/6b3af6c9.html You need to install the 32-bit flash plug-in and active-x from here: http://labs.adobe.com/downloads/flashplayer10.html After that you should be able to see your demonstration using IE 32-bit in Windows 7 64-bit. Carlos "John Melchitt" wrote: > ...

How to Clear the AutoDetect Cache for the To: field
HI, When sending a message in Outlook, one begins to type the destination address in the To: field. Generally speaking if one has sent email to this address in the past then Outlook will auto detect and provide a suggested list of reciepients (know what I'm talking about???). Anyway, I know this feature can be disabled so one is never provided with a list of possible receipients but does anyone know how to clear this cache???? Thanks Remove individual addresses from the autocompletion cache by highlighting the entry when presented in the suggested names list (use your arrow key ...

How to force the user to fill in values for yes/no fields ?
Hi ! I'm using MS Access 2003. I have a table with a number of yes/no fields. When a new record is started, I want the user to explicitly specify a value for each of these fields, e.g. by choosing one of two radio buttons associated with the field. Now, it was no problem for me to arrange an option group with two suitable radio buttons for each of these fields. The user can then choose explicitly between yes and no. However, all fields seem to have implicit values immediately after a new record has been started. Therefore, the new record can be stored in the db without the user making...

will RMS 2.0 work with Windows 7
Has anyone tried using RMS 2.0 with Windows 7? What version RMS are you using? Yes 2.0.0126 -- Maurice Gordon Maurice@americanretailsupply.com Sales/Support 1-800-426-5708 XT 1307 "Larry" <Larry@discussions.microsoft.com> wrote in message news:0E0D2035-1FB0-497E-8F73-AF5FDA947E64@microsoft.com... > Has anyone tried using RMS 2.0 with Windows 7? What version RMS are you > using? Hi Larry, RMS 2.0 SP2 working fine with windows 7 Vijay "Larry" wrote: > Has anyone tried using RMS 2.0 with Windows 7? What version RMS ar...

Coping Saw w/ 5 Pc Blade Set
Price:$5.99 Image: http://thediscountlocator.info/image.php?id=B0006UOV8G Best deal: http://thediscountlocator.info/index.php?id=B0006UOV8G Coping Saw w/ 5 Pc Blade Set Zinc plated steel body construction. 3 ½ Lacquered hardwood handle is small enough not to get in the way yet large enough to get a good grip. Very thin and compact design makes it easy to get into tight areas. 5 tempered blades: 1- medium for cutting woods, 1-fine for thick metal or hardwood, 1- extra fine for thin metal or thin woods, 2- hacksaw blades for all metals. Blades are easy to replace, just unscrew the ha...

How do I stop Excel from deleting the Window's Clipboard Contents
Note: This is with the Office Clipboard turned OFF! For example, If I write the following in 5 cells in Excel. [Hello ][My ][Name ][Is ][Fred ] Then I Copy (CTRL+C) the Cells: [Is ] and [Fred ] to the Clipboard... Then I press [Esc] (there are a dozen other ways to do this, but, this is the simplest) Now, I go to any cell, anywhere in my workbook, and press Paste (CTRL+V)... No Data... If I open up Notepad... Paste (CTRL+V).... No Data... Excel has *decided* for me, that I want to delete the Window's Clipboard Contents. Although I ha...

Excel 2003
There doesn't seem to be an Office 2003 group, I hope you can help, this is driving me mad! I want to open two different spreadsheets in two different instances of Excel, so I can compare them side by side without switching. Excel XP was OK, but Excel 2003 won't let me, so at the moment I've got one spreadsheet running on a different PC! I've seen a similar question asked many times, but the answer to use: Tools | Options | View Tab | Show| Windows in Taskbar does *not* fix the problem, this just lets you switch windows on the Taskbar; I want two separate windows like in X...

Help with SQL- SupplierList cost into Item cost field
Hi, re-posted! See below. Hi, thanks for that- it worked perfectly. There is just one snag however and I didn't think of it until I was testing. Many of the suppliers use specific currencies so the information I need copied from the Supplier tab is actually the Local Cost. When I view the SupplierList table, Local Cost doesn't appear as a column. Is it just a calculation based on exchange rates for information or does it actually exist somewhere within the database? Your help once again would be much appreciated. T. "convoluted" wrote: > Hi Tara - backup your...

Modifying item lookup window
Is it possible to modify the item lookup window to show Description by default instead of Short Description? I know users can get to the description on that window with an additional click, but when they are doing lookups frequently that's a lot of extra clicks. Thanks. -- Jim@TurboChef Hi Jim, There is a product called SmartFill that will allow you to create the lookup window for an Item anyway you want. It is relatively inexpensive, probably a little more then the cost of customizing the window. But it works with Items, Customers, Vendors, Account Numbers, Employees, etc. it a...

ONDIRTY MOVE TO NEXT FIELD
Hi, I have a combo box, when I hit Y (yes) I would like to save a keystroke and have the cursor move to the next field. How would I do that? I tried ONDIRTY but it gave me an error and couldn't move. Thanks in advance, Bonnie Try the AfterUpdate event of the combo box. -- Ken Snell <MS ACCESS MVP> "Bonnie" <Bonnie@discussions.microsoft.com> wrote in message news:0068FF95-2485-4FA7-B59A-4BA9A1E1CF86@microsoft.com... > Hi, > > I have a combo box, when I hit Y (yes) I would like to save a keystroke > and > have the cursor move to the...