Calling employee lookup from button through VBA code

Dear All,

Can anyone show me how to call an existing GP employee lookup from a button 
of a modified form through VBA code. 


Thanks in advance.

-- 
Developer
0
Dexdev (27)
3/17/2007 9:46:05 AM
greatplains 29623 articles. 6 followers. Follow

6 Replies
940 Views

Similar Articles

[PageSpeed] 30

Hi,

If I'm understanding the question - you need to add the lookup button to 
your project and make sure your project provides that it runs on the modified 
form.

Leslie

"Dexdev" wrote:

> Dear All,
> 
> Can anyone show me how to call an existing GP employee lookup from a button 
> of a modified form through VBA code. 
> 
> 
> Thanks in advance.
> 
> -- 
> Developer
0
LeslieVail (702)
3/17/2007 10:46:02 PM
Hello Dexdev

As per my understanding you cannot call the GP Lookups to your customized vb 
form. since the parameters are used by lookup button to put the values 
selected by you in the required fields from the lookup field.

In Short you need to create your own lookup button on your own customized 
form of VB.

Akram.


"Leslie Vail" wrote:

> Hi,
> 
> If I'm understanding the question - you need to add the lookup button to 
> your project and make sure your project provides that it runs on the modified 
> form.
> 
> Leslie
> 
> "Dexdev" wrote:
> 
> > Dear All,
> > 
> > Can anyone show me how to call an existing GP employee lookup from a button 
> > of a modified form through VBA code. 
> > 
> > 
> > Thanks in advance.
> > 
> > -- 
> > Developer
0
Akram1 (98)
3/18/2007 8:48:10 AM
Hi,


1- You need to add the button through modifier.
2- Add the form + the button to VBA
3- Add the Lookup you need to open to VBA as well
4- Go to VBA, and create a sub on "Button Change" containing:
    "YourLookupWindowAdded.Open"

Example:

Private Sub BtnOpenEmp_Changed()
   Employees.Open
End Sub


"Dexdev" wrote:

> Dear All,
> 
> Can anyone show me how to call an existing GP employee lookup from a button 
> of a modified form through VBA code. 
> 
> 
> Thanks in advance.
> 
> -- 
> Developer
0
wissam (22)
3/18/2007 12:33:00 PM
Hi,


1- You need to add the button through modifier.
2- Add the form + the button to VBA
3- Add the Lookup you need to open to VBA as well
4- Go to VBA, and create a sub on "Button Change" containing:
    "YourLookupWindowAdded.Open"

Example:

Private Sub BtnOpenEmp_Changed()
   Employees.Open
End Sub


Wissam A.B.
Certified GP Master
Bahrain


"Dexdev" wrote:

> Dear All,
> 
> Can anyone show me how to call an existing GP employee lookup from a button 
> of a modified form through VBA code. 
> 
> 
> Thanks in advance.
> 
> -- 
> Developer
0
wissam (22)
3/18/2007 12:34:00 PM
Thanx Wisam, your idea is working 5n can u pls show me how to display the 
lookup value on modified form field in vba code as I know the code for dex is 
" open form lookupform return to field"

Thanks in advance
-- 
Developer


"Wissam" wrote:

> Hi,
> 
> 
> 1- You need to add the button through modifier.
> 2- Add the form + the button to VBA
> 3- Add the Lookup you need to open to VBA as well
> 4- Go to VBA, and create a sub on "Button Change" containing:
>     "YourLookupWindowAdded.Open"
> 
> Example:
> 
> Private Sub BtnOpenEmp_Changed()
>    Employees.Open
> End Sub
> 
> 
> Wissam A.B.
> Certified GP Master
> Bahrain
> 
> 
> "Dexdev" wrote:
> 
> > Dear All,
> > 
> > Can anyone show me how to call an existing GP employee lookup from a button 
> > of a modified form through VBA code. 
> > 
> > 
> > Thanks in advance.
> > 
> > -- 
> > Developer
0
Dexdev (27)
3/19/2007 6:29:05 AM
Well it's not that straight forward in VBA.
After you follow the previous steps i mentioned, you have to add the 
"return" code to the Lookup Itself.

1- When adding the Ekployees lookup to VBA, make sure to add the grid and 
the Employee ID field in it.
2- Go to the grid, and add code under "After Got Focus"
3- OriginalForm.AddedField.Value = LookupGrip.EmployeeID.Value
    Close or Hide the lookup.

Good Luck,

Wissam A.B.
Certified GP Master
Bahrain
    

"Dexdev" wrote:

> Thanx Wisam, your idea is working 5n can u pls show me how to display the 
> lookup value on modified form field in vba code as I know the code for dex is 
> " open form lookupform return to field"
> 
> Thanks in advance
> -- 
> Developer
> 
> 
> "Wissam" wrote:
> 
> > Hi,
> > 
> > 
> > 1- You need to add the button through modifier.
> > 2- Add the form + the button to VBA
> > 3- Add the Lookup you need to open to VBA as well
> > 4- Go to VBA, and create a sub on "Button Change" containing:
> >     "YourLookupWindowAdded.Open"
> > 
> > Example:
> > 
> > Private Sub BtnOpenEmp_Changed()
> >    Employees.Open
> > End Sub
> > 
> > 
> > Wissam A.B.
> > Certified GP Master
> > Bahrain
> > 
> > 
> > "Dexdev" wrote:
> > 
> > > Dear All,
> > > 
> > > Can anyone show me how to call an existing GP employee lookup from a button 
> > > of a modified form through VBA code. 
> > > 
> > > 
> > > Thanks in advance.
> > > 
> > > -- 
> > > Developer
0
wissam (22)
3/19/2007 6:50:10 AM
Reply:

Similar Artilces:

Call in?
Do new owners of Office X have to call up Microsoft to register their copy? If yes, what's the number? thanks. Ming <asdf@asdf.com> wrote: > Do new owners of Office X have to call up Microsoft to register their > copy? If yes, what's the number? thanks. Nope. We're not using Windoze :->>> This version does not require activation. Corentin -- - Mac:MS MVP (Francophone) - (MS) MVP: http://support.microsoft.com/default.aspx?ln=FR&scid=fh;FR;mvp Newsgroups produits MS: http://support.microsoft.com/newsgroups/?ln=FR ...

WinINet error (code 12110
Hi, When I try to publish my web pages I get the message: An unknown WinINet error has occurred (code 12110). If I click OK and publish again the error will appear again. If I keep trying publish, OK..... my pages will finally upload. Why do I get this error and how do I resolve the problem? Your help would be appreciated. Thanks, Phil That error means the ftp session is already in progress. Are you uploading large files? -- ~~~~~~~~~~~~~~~~~~ Rob Giordano Microsoft MVP Expression Web "Phillip" <Phillip@discussions.microsoft.com> wrote in mes...

VBA Macro help
Hi Friends, I have taken a project using Excel. Now wt i need is that if i click a command button in excel the macro coding must open a excel file from one location and do a some formating (bold the header, sorting by client / stcd / TOS etc in ascending / decending delete columns last action, pat type etc change PN Assign column to Currency insert SIF cloumn before TYPE SRVS .and page formating as landscap, header (XXXXXXXX), page number at the center bottom and save the file name with password (12345) with the filename continuing the current date for example "N0123(curren...

Covered Call Options
Hello all, I do I go about dealing with a covered call transaction in Microsoft Money 2007 Premium? Currently what I am doing is inputing the option symbol, and choosing the transaction "Sell to Open" then when I go to expire the option I try to do a Sell to Close. However it does not seem to work? Also what happens if instead of expired I has the position assigned? how would I account for that? Thank you. Shhhh In microsoft.public.money, Shhhh wrote: > >I do I go about dealing with a covered call transaction in Microsoft >Money 2007 Premium? Currently what I am doing is...

Java code to force update of a field on a lead form
I'm trying to create workflows that notify me when a user hasn't contacted a lead for more than 2 days. Currently I'm doing this by checking the condition of the Qualified status after waiting for two days, however this isn't ideal as the lead might not be in a position to be Qualified or Unqualified at that time. I've put a last updated field on the lead form that automatically generates the date and time when a lead is saved but I can't seem to create a workflow that says 'if the last updated date is greater than 2 days trigger an event'. I think I cou...

VBA copy xls to ppt
This may be basic but from an excel spreadsheet I want to automate the copy/paste of charts to a ppt deck. Altogether there are around 300 charts to be crammed into 50 slides. Any suggestions on tutorial/VBA coding would be appreciated! ...

Call center tracking and reporting
Anyone use CRM 4.0 for call tracking? Our Sales/Marketing is set up. Now I need to decide how to most efficiently customize CRM 4.0 for our company's call tracking portion. Can someone send me a link to information? thanks ...

Support Code:85010001
Howdy, I just purchase a Sprint PPC-6700 in the hopes that it would sync directly to my Exchange SP2 server. The error message that I receive is "Your account in Microsoft Exchange Server does not have permission to synchronize with your current settings. Contact your Exchange Server administrator. Support Code:850100001." Does anyone have a resolution to this problem? Thanks, Prayer Sorry, no help, but I'd love to hear what you think of the 6700 once you get it working! "Solanky, Prayer S." wrote: > Howdy, > > I just purchase a Sprint PPC-6700 i...

Using OUTPUT TO in VBA, then how to modify the XLS from Access?
I'm using the simple "OUTPUTTO" command to send a query over to Excel, however we will have many users and we would like to programmatically add the header rows, date printed, turn on the auto filter and freeze panes, all of which I can do within a Macro in Excel, but how do I call that macro to run from Access and How to run it on the file that they just created? Current Code: DoCmd.OutputTo acOutputQuery, "MainRptWUser", acFormatXLS, , True "ThriftyFinanceGirl" wrote: > I'm using the simple "OUTPUTTO" command to send...

missing NEWS button #2
In Outlook 2003, I want to add the NEWS button from the commands bar GO and then NEWS. I can not find it. It is not a choice in the add/command box. (where it should be,so you can add it) Any suggestions is appreciated. To get the News command back, go back to the Programs tab in Control Panel | Internet Options and change the default newsreader to Outlook Express. If OE prompts you to make it your default newsreader the next time you launch it, clear the "Always perform this check..." box and then click the No button. You may need to reset the Menu Bar and/or restart Outloo...

Using VBA to assign a macro to button
I've searched through several posts but can't find a solution that helps me. Here is what I am trying to do: I have a button with an attached macro that imports a data table from a sheet for the user to edit. When the user is done he must select a save button, which is attached to a macro that copies the data table back to its original place with the new data. All works well to this point. However, There are many data tables that need to be brought in by means of macro attached buttons. Once the user is done, each needs to be saved back to its original location when the use...

Excel VBA Question
Ok, I am stuck trying to write a function to do the following, and it would be greatly appreciated if someone could help me. I have two columns, one of data, and another of dates. I need to write a function that filters by dates, and counts the total number of items For Example: My data (column 1) has Members, Non_Members, and Other. My Dates (Column 2) have, well, dates. I have a report sheet that I need to report the numbers. So in the report for each data type (Member, Non_Member, Other) I want to be able to use function (=blah(date I am filtering for less than or equal to)) an...

telephone calls
when placing a telephone call using outlook, everything works fine except I can't hear the person i am talking to. They can hear me find. When I use a telephone program not associated with outlook every thing works great. can someone help ...

Command button code
I have created a form, and within this form are several subforms. I need a command button which will take the data that is entered into a field in the main form and update it in the corrosponding field in the subforms (to avoid the user repeatedly having to fill this field out in the subforms). Can anyone tell me how to to this? Cheers Kirsten Tui, You don't have to... since the main form is related to each of the subform tables (Parent/Child), any value on the One side of the relationship can always be reassociated "on the fly" to the Many side in any subsequent ...

Calling Macro
Hi All, I have macro like this sub unique() '''''''' '''''''' Counter_item = 0 For Each Item In nodups counter_item = counter_item + 1 bic_var = Item Call Ps_Match Next Item end sub I have another macro Sub Ps_Match() ''''' ''''' If counter_item <= 1 Then call another_macro() end if end sub In the first macro i am declaring counter_item equals to 1. In my second macro i need to call that number. At the to of the module put: Public Counter_I...

Insert spinning button with time format in Excel 2000?
I am making a form template in Excel 2000. Every time I try to enter a spinner button I can't get it to work with time format. I want the time to be between 00:00 and 24:00 with 15 minute increments. I've tried with and without the colons but nothing is working. I put a spinner from the Forms toolbar on a worksheet. I rightclicked on it and chose format control. On the control tab, I used: Minimum value: 0 maximum value: 96 Incremental change: 1 And cell link A1 Then in B1, I put: =a1/96 and formatted as time: hh:mm 96 is the number of 15 minute increments in a day (4*24...

CoCreateInstanceEx failed with error code 800706BA
Dear All My VB client on Win2k with SP4 is trying to connect to the remote server present on WINXP with SP2 when the client connects it gives the following error msg. CoCreateInstanceEx failed with error code 800706BA can anyone help me out as to why it happens. the server and client works fine when communicated from Win 2k to Win2k but in XP why such a problem comes. Regards Mary The firewall in WINXP SP2 might be blocking the calls. run the firewall.cpl applet and add your application to the list of authorized applications. -- Cheers Check Abdoul [VC++ MVP] --------------------...

How do I set up a database for tracking Employee Absense?
I am looking for an improved way to track the vacation, sick days and bereavement leaves for 150 employees. Looking for suggests on how to design a databse to reflect my specific needs A very simple database would probably contain an employees table, an AbsenceType table, and an EmployeeAbsences table. It might need a few more, depending on what type of information you want to get out of it. Do you want to store the number of authorized vacation days? Can employees roll their vacation days over from one year to the next? What types of reports do you want to generate? What type of syste...

Send/Receive button has failed
Neither the send/receive button on the standard toolbar nor the F5 button are working. However, I can get email by going to tools-->send/received-->2 All Accounts. Can anyone tell me how to get the these buttons to work again? Tod ...

Workflow -Assembly Call
How does add subtract in the Workflow>> assembly call works. I do understand that ypu can write your own custom workflows, register it and then call them from here, but I am pretty confused with the existing functionality. workflows can call other workflows workflows can also call a method in a .net assembly. ie you could write a piece of code in c# or vb.net and then have the workflow call your code. ======================= John O'Donnell Microsoft CRM MVP http://codegallery.gotdotnet.com/crm "SAM" <SAM@discussions.microsoft.com> wrote in message news:DE...

Outlook Macro (VBA) programming
This is a wierd one (at least to me). I'm not a VBA expert by any means. I want to write a macro that, when Outlook 2003 executes it, causes Outlook to close. That's all. No other functions. Just a macro that says "Exit" or "Close Application" or "Alt-F4". You can imagine that this is a difficult macro to record (even if Outlook could record macros, how would you record THAT?) For a VBA macro running in Outlook the code would be quite easy: Sub KillOutlook() On Error Resume Next Application.Quit End Sub Clicking on the Close box at the top rig...

lookup formula for currency
On my spread sheet the relevant account currency is entered in column B. Can other columns be formatted to bear the currency symbol entered in column B.? E.g if A contains USD can G show as USD100.00 when 100.00 is entered and will it still be a numeric value? Also, if I have three rate tables can i have a formula the looks up one of the currency rate tables depending on the country in column A. Graham Not completely sure what you require but try looking at Format > Cells > Custom. You can create a format to suit. However the cell will only display the format you enter and I get...

Letter Writing Assistant needs additional employee ranges
Currently, letter writing assistant only allows selecting of ranges by employee last name and employee ID. Larger employers would benefit from having additional sorts, for example by department, position or location. -- Patrick Anderson, SPHR HR and Payroll Consultant JAT Computer Consulting ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-...

Option Button #3
Greetings I�m trying to create a �survey form� with option button for example POOR FAIR GOOD 1) How was the service? [ ] [ ] [ ] 2) How was the cleanliness? [ ] [ ] [ ] etc�. My problem is every time I place a new row of questions and you selec an option of the new question, the prior question option disappear (since you only can have one hi-lited apparently). If there is any way to avoid this? So each row can hav its own rating? Im trying to avoid �X� and �Yes and No� in the cells since the optio button look...

LookUp
Say I have data like this A B Rpm Feed 1000 .005 5000 .003 2500 .002 and I use the formula: =large(A1:A3,1) to find the largest number in A how do I multiply the found number by the corresponding number in colum B. Thanks one way: =LARGE(A1:A3,1)*VLOOKUP(LARGE(A1:A3,1),A:B,2,FALSE) In article <AI6dncjPZZPC_YyiU-KYuQ@comcast.com>, "tag" <tagger4@comcast.net> wrote: > Say I have data like this > A B > Rpm ...