Add new field to grid

I have added the Customer Ship to Address to the RM Customer Inquiry grid.  I 
need to create VBA code to populate this field.  In a grid window, where do I 
open the data base and at what point do I read the table to populate this 
field.

Thank you
Amy
0
Amy (241)
10/18/2006 8:38:02 PM
greatplains 29623 articles. 6 followers. Follow

3 Replies
831 Views

Similar Articles

[PageSpeed] 44

Hi Amy

Using the Window_AfterOpen event, you will need to use RetrieveGlobals to 
obtain the login credentials, then ADO to open a connection to the SQL server.

You close the connection on the Window_AfterClose event.

Then on the Before_LinePopulate event on the Grid form, you perform the 
actual SQL query.

I have an example you can have it you want it.  Please ask your partner to 
contact me at the address below (remove the online. first).

David Musgrave [MSFT]
Senior Development Consultant
Escalation Engineer - Great Plains
Microsoft Dynamics Support - Asia Pacific

Micorosoft Dynamics (formerly Microsoft Business Solutions)
http://www.microsoft.com/Dynamics

mailto:dmusgrav@online.microsoft.com

Any views contained within are my personal views and 
not necessarily Microsoft Business Solutions policy.
This posting is provided "AS IS" with no warranties, 
and confers no rights.  


"Amy" wrote:

> I have added the Customer Ship to Address to the RM Customer Inquiry grid.  I 
> need to create VBA code to populate this field.  In a grid window, where do I 
> open the data base and at what point do I read the table to populate this 
> field.
> 
> Thank you
> Amy
0
dmusgrav1 (1325)
10/19/2006 1:33:01 AM
Thank you David for your reply.  On the grid window I do not have an open or 
close event.  I put code on the Before_LinePopulate to open the Database if 
it is not already open.  I did try opening the data base on the main window 
but on the grid window I received a message that connection not open or 
invalid.  Where would you open the database?

Thank you
Amy

"David Musgrave [MSFT]" wrote:

> Hi Amy
> 
> Using the Window_AfterOpen event, you will need to use RetrieveGlobals to 
> obtain the login credentials, then ADO to open a connection to the SQL server.
> 
> You close the connection on the Window_AfterClose event.
> 
> Then on the Before_LinePopulate event on the Grid form, you perform the 
> actual SQL query.
> 
> I have an example you can have it you want it.  Please ask your partner to 
> contact me at the address below (remove the online. first).
> 
> David Musgrave [MSFT]
> Senior Development Consultant
> Escalation Engineer - Great Plains
> Microsoft Dynamics Support - Asia Pacific
> 
> Micorosoft Dynamics (formerly Microsoft Business Solutions)
> http://www.microsoft.com/Dynamics
> 
> mailto:dmusgrav@online.microsoft.com
> 
> Any views contained within are my personal views and 
> not necessarily Microsoft Business Solutions policy.
> This posting is provided "AS IS" with no warranties, 
> and confers no rights.  
> 
> 
> "Amy" wrote:
> 
> > I have added the Customer Ship to Address to the RM Customer Inquiry grid.  I 
> > need to create VBA code to populate this field.  In a grid window, where do I 
> > open the data base and at what point do I read the table to populate this 
> > field.
> > 
> > Thank you
> > Amy
0
Amy (241)
10/19/2006 7:45:03 PM
Amy

You need to open and close your Database connect using the parent window of 
the grid.  Declare your connection variable as public so it can then be 
referenced from Grid.  For example: ParentWindow.Cn

My example will show how this is done.


David Musgrave [MSFT]
Senior Development Consultant
Escalation Engineer - Great Plains
Microsoft Dynamics Support - Asia Pacific

Micorosoft Dynamics (formerly Microsoft Business Solutions)
http://www.microsoft.com/Dynamics

mailto:dmusgrav@online.microsoft.com

Any views contained within are my personal views and 
not necessarily Microsoft Business Solutions policy.
This posting is provided "AS IS" with no warranties, 
and confers no rights.  




"Amy" wrote:

> Thank you David for your reply.  On the grid window I do not have an open or 
> close event.  I put code on the Before_LinePopulate to open the Database if 
> it is not already open.  I did try opening the data base on the main window 
> but on the grid window I received a message that connection not open or 
> invalid.  Where would you open the database?
> 
> Thank you
> Amy
> 
> "David Musgrave [MSFT]" wrote:
> 
> > Hi Amy
> > 
> > Using the Window_AfterOpen event, you will need to use RetrieveGlobals to 
> > obtain the login credentials, then ADO to open a connection to the SQL server.
> > 
> > You close the connection on the Window_AfterClose event.
> > 
> > Then on the Before_LinePopulate event on the Grid form, you perform the 
> > actual SQL query.
> > 
> > I have an example you can have it you want it.  Please ask your partner to 
> > contact me at the address below (remove the online. first).
> > 
> > David Musgrave [MSFT]
> > Senior Development Consultant
> > Escalation Engineer - Great Plains
> > Microsoft Dynamics Support - Asia Pacific
> > 
> > Micorosoft Dynamics (formerly Microsoft Business Solutions)
> > http://www.microsoft.com/Dynamics
> > 
> > mailto:dmusgrav@online.microsoft.com
> > 
> > Any views contained within are my personal views and 
> > not necessarily Microsoft Business Solutions policy.
> > This posting is provided "AS IS" with no warranties, 
> > and confers no rights.  
> > 
> > 
> > "Amy" wrote:
> > 
> > > I have added the Customer Ship to Address to the RM Customer Inquiry grid.  I 
> > > need to create VBA code to populate this field.  In a grid window, where do I 
> > > open the data base and at what point do I read the table to populate this 
> > > field.
> > > 
> > > Thank you
> > > Amy
0
dmusgrav1 (1325)
10/20/2006 2:13:01 AM
Reply:

Similar Artilces:

Message From Field in Folder
When viewing the list of my new messages, is there a way to see the email address of the sender instead of the alias before I open it? In the From column I see "John". When I open the email I see "John <john@johnsemail.com>". I want to see the "john@johnsemail.com" before I open it so I can tell the difference between emails from "Microsoft Support <yourfu@edifyouopenedthis.com>" and "Microsoft Support <someguywhosreally@microsoft.com>" I am currently using outlook 2002 and 2003 alternately based on my mood. Mike If you ...

modify fields
Hi - just started using CRM and have several questions. 1. How do I modify the COUNTRY field? I want a user to be able to type in the name of the country and return and display the 2-letter country abbreviation? Do I have to build a new table for that or can I modify the country field as it is now? 2. How do I apply or change field rules such as case- convert, etc. for either existing fields or fields I create? Thanks in advance for any assistance you can give me. Cheers Ruthie I think the existing country field is a simple text field. You cannot out any logic behind these fields. One op...

report new page for each alpha
I have a report that produces an alphabetic directory, with the entries for each new letter (A, B, C,) starting on a new page. I have one letter, U, which has only one entry, and for some reason it is coming out on the last T page (it is the only single-entry letter which happens to fall behind a "full" page, where there isn't room on the previous page - but there are plenty of other "short" pages where it correctly does a page break before a letter. Any reason a particular letter (and it's not the only single-entry letter) might not break pages proper...

Paste Filtered Range to New Workbook- AS
Hello, I recorded a macro and additionally used the DG help to construct the following macro; however, I'm not certain how to copy the filtered range (which will vary every time the worksheet is used) or how to find the last row of the workbook to which the data will be pasted. Any help would be great! And thanks in advance. Sub Macro1() Dim wbname As String Dim copyrange As Range Dim LastRow As Range Dim rng As Range ' Macro1 Macro ' Macro recorded 12/8/2009 by asagay ' wbname = ActiveSheet.Range("g1").Value & ActiveSheet.Range("j1&qu...

system tray new mail icon gone :(
Before i used to have an icon pop up in my system tray when i received a new mail. I accidently hid it one time and it no longer comes back. How can i get it back. I run Outlook Xp on a Win XP pro machine. Thanks in advance.. --minnoce944 Check Tools, Options, Email Options, Advanced Email Options. MAke sure the checkbox for "show an envelope in the notification area" is checked. If it is, right click on the Windows taskbar. Choose Properties, then customize. Your icon might have just been set to always hide. If so, you can change it to always show. -- Patricia Cardoza Outlook...

Saving Monthly Accounts and starting a new Month?
Hi Everyone, I really enjoy the Access Database System it has helped me a lot with my accounts but I must be doing something wrong because, I keep opening new databases for each month instead of it following on from the previous month and using the same "Categories!." So my question is How do I save the previous month and let it be stored, and start a new month on the same system or page but without adding up what has been put in the system... If you know what I`m on about. Thank you Angeldelight... melting in the UK weather :) Hard to advise without some info ...

Should be simple to add additional address book for outlook.
Ok this is a simple request that doesn't seem to work. Using the ESM (exchange 2003) SBS. Navigate to All Global Address lists. Right click and new Global Address List. Then I go to outlook client click new email. Click on the address book navigator link. In the available address books I only have global address list or the outlook contacts. How do you get the new Global address book to display ? On Sun, 18 Jun 2006 19:46:01 -0700, Conrad Gotzmann <ConradGotzmann@discussions.microsoft.com> wrote: >Ok this is a simple request that doesn't seem to work. >Using the ESM (...

Executive summary for New Deployment
Is there a resource (templates) Microsoft provides about new deployments for Windows 2003 AD / Exchange 2003 for Partners? I am hoping a doc that shows resources use, each phases, what is entailed at each phase, high-level design conideration (inplace upgrade vs. new install) - thank you kindly. The MSA might be useful for you. http://www.microsoft.com/windowsserver2003/msa/default.mspx "JPaul" <jpaul@mail.com> wrote in message news:%23pao%23$WpEHA.3592@TK2MSFTNGP14.phx.gbl... > Is there a resource (templates) Microsoft provides about new deployments > for Wind...

Outlook 2003 Add-in: Personal Folders Backup uninstall problem
Hello techie nerds out there Help! I am trying to uninstall this utility to reinstall it on another desktop on the same machine. It seems you can only run this utility on one desktop? Running windows XP pro and Outlook 2002 The programme does not show up in the Add/Remove programme window in the Control Panel. Many, many thanks Paul Paul Allen <ict@wandsworthvb.org.uk> wrote: > I am trying to uninstall this utility to reinstall it on > another desktop on the same machine. It seems you can only > run this utility on one desktop? Doesn't seem to be the case here. ...

enter value based on drop down list of another field?
I have an excel 2003 spreadsheet with 3 worksheets. In sheet 1, I created a drop down list in column A based on values in sheet 3, column A (item number). Thisd data comes from sheet 3, where I have column A (Item #'s), column B (Item desc)an Column C (price) In column B of sheet 1, I have Item Descriptions and in column C I have price. I want this to automatically fill in based on what I enter in the column A sheet 1 and it should get the corresponding values from sheet 3 column B and C. I can make the drop down list in sheet 1 column B and C, but some of the descriptions need ...

transferring outlook express files to new computer
I am trying to transfer my OE files to my laptop. I have tried to use the export feature but it is not working. In scanning the Knowledge Base it seems I need to have the full version of Outlook or Exchange because it has files in order to make this work??? I don't have these programs on my old computer - just OE. I tried copying all the email files/folders into the proper/corresponding directory on my laptop but they just don't show up. I really really don't want to lose all my email. Is there a solution? Many thanks and feel free to email me a julie@crowbold.com ...

Creating a new default message template
I have a email template that I want to make the default. In other words, when you click on New to create a new email, I want the message template that I have created to come up as the default. Does anyone know how to do this? What you are proposing is a very bad idea. Using a custom form as the = default for new messages will guarantee that non-Outlook recipients = won't be able to read attachments you send.=20 I'd suggest that you back up and explain what functionality you were = hoping to add by changing the message form, and in what version of = Outlook.=20 --=20 Sue Mosher, ...

Add contacts to Global
I am a parent trying to get our elementary school up to date. I want to add all the students in the school's CONTACTS (address, phone, email address, etc). They do use Exchange as I saw GLOBAL as an option at one of the teacher's pc. The principal would like me to do this. They outsource their computer technical work, so I am thinking I would need administrative access to add contacts to the global contacts, correct? Since I'm not a network person, but I do know a lot about Outlook, I need to know EXACTLY how to accomplish this and what info I need to find out from the...

Restrickting from field
Hi, When you create new email, you can click option and tick FROM field. It will be add FROM field and you can use address book to pick up any name. Are their any options or policy to restrict this function? Thanks Using Exchange server? This should not be possible by default - someone has changed the permissions. What version of Exchange? Follow the KB 262054 to see where permissions might be set - and remove groups that shouldn't be there. wschoi wrote: > Hi, > > When you create new email, you can click option and tick > FROM field. > > It will be add FROM f...

Add a nwe mail folder with new email address
I want to add a new folder within the mail area in Outlook 2003. opened up an additional email account with my IP and want that email t go to a seperate main folder in outlook. Under All Mail Folders I'v got Personal Folders and Hotmail as root folders in the area. I wan to add another root folder for my new email only. Thank you, Crai ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com Apart from special accounts like HTTP and IMAP when you collect POP3 then all mess...

Excel 2007. How do I get un-installed add-ins off the toolbar?
I have 2 Large Icons on the ribbon/toolbar of Excel 2007. These are Omnipage and s-force. Both of these have been uninstalled and I have de-activated both add-ins. How do I get these off the toolbar forever? thanks ...

Xml-Grid for editing NodeList
Hey XML-Guys, I'm playing now for a couple of days with C# and XML. In earlier threads a mentioned that I develop smaller Web-Applications. Therefore I want to edit and add new nodes to my Xml-Documents. To use a DataSet is not very handy because if the data is to complex it allowed me not to add a row. I'm looking for a XML-Grid that is able to have a XML-File as DataSource and let me filter the Data over a XPath-Expression. After filtering a want edit the resulting NodeList and also add Nodes. The Header of the Grid should show the NodeNames and the DataRows should conta...

Automatic Data Entry Script OnChange Event for Date Field.
Hi, Sub: Automatic Data Entry Script OnChange Event for Date Field. has anyone assigned 'Today date'( new Date()) to a custom date filed on the form - OnChange of a Picklist field, I have the following code. DatefiledName.value = new Date(); This assigns, currect date to the field, but then when I save it does not like it. When I manually assign a date it displays in the format mm/dd/yyyy, and saves correctly, so I changed the script to: d= new Date(); s = d.(getMonth() +1); s += '/' + d.getDate(); s += '/' + d.getFullYear(); DatefiledName.value = s; This also acc...

How do I add an indicator line to a Gantt chart in excel?
I have created a Gantt chart in Excel. I would like to indicate a specific date - most of the time today's date - by a vertical line showing how many days have passed and how many yet to go for specific tasks. I have attempted to create an 'XY graph' on top of the bar/Gantt chart, but the two do not seem to be compatible. Hi, See my examples of various ways of adding a datum line to a chart. I'm pretty sure one of the techniques should work for you. http://www.andypope.info/charts/averageline.htm Cheers Andy Steve wrote: > I have created a Gantt chart in Excel. I...

How to add another target to VidPN in WDDM driver?
Thanks all for the replies before and I'd like to ask few more questions related to VidPN management of WDDM driver. When WDDM miniport driver enumeratse child devices and connected external monitors, it first detects its all child devices in DxgkDdiQueryChildRelations, and next check each child actually has connected output in DxgkDdiQueryChildStatus. So, to implement adding another(virtual) monitor I faked one of given PDXGK_CHILD_STATUS parameter(HotPlug.Connected) to have true. And I filled up followed EDID query requests as well. Then I could see another monitor attached ...

Data missing from enterprise custom task fields after migrating
We can see the enterprise task fields, but none of the data is displayed in files migrated from Project Server 2003 to 2007. Any ideas? -- michael Michael: What process did you follow for migration? -- Gary L. Chefetz, MVP, MCT, MCTIP Business: http://www.msprojectexperts.com FAQs: http://www.projectserverexperts.com BLOG: http://www.projectserverhelp.com "michaelj" <notreallyme.com> wrote in message news:4BD612D9-D1AD-4FF8-B103-699AB1B54D06@microsoft.com... > We can see the enterprise task fields, but none of the data is displayed > in > fil...

New Import Utility for RMS Store Ops and HQ!
Just a post to advise RMS users and partners that we have just released a new import utility for RMS. It works with both HQ and SO and allows importing of items only, but does allow for changes and updates. Priced at US $495 or GBP £275 for end users. Reseller discounts are available If you are interested please email me at rod@rsgplc.com with the subject RSG Import Utility Rod Barlow Retail Systems Group PLC (Microsft RMS Reseller UK) ...

'Signature for new messages' which won't work
Hi, I have Outlook 2003 and if I go to Tools>Options>Mail Format I see I can choose a signature for new messages. I have 3 e-mail accounts set up, and have set a new message signature for each one, e.g.: 1) Home > Sig 1 (default) 2) Work > Sig 2 3) Play > Sig 3 However when I try to create a new e-mail message, it seems impossible to automatically start a new e-mail using my Work or Play accounts, and therefore have the signature automatically entered. So what is the point of this feature if there is no way to use it? I'm sure I'm missing so...

How do you edit HTML source in a new outlook email message?
Trying to create a new email message by inserting HTML. I don't see a place to edit source for a new message. This is probably a really easy thing to do, I just can't find out where the "edit source" option is, and the help files don't seem to be any help. Thanks, Justin The feature doesn't exist in Microsoft Outlook. "justinvanderpol" <justinvanderpol@discussions.microsoft.com> wrote in message news:1ADC71DF-40BC-4656-98A8-A473EB40E837@microsoft.com... > Trying to create a new email message by inserting HTML. I don't see a > place ...

Add items to SupplierList
I just imported a new catalog of items to our database using EMS import, were newly insterted and some were updated. The problem I'm having is getting the supplier cost to update for the items that were in already and adding the new items to the supplierlist table. I imported the SupplierID to the Item table just can't figure out the query to go the other way updating and adding new. Any help would be great. You need to use T-SQL in the management studio. Use an InnerJoin of the supplier id to the item id and set the cost to = supplier cost if it is the most recent. "Do...