Form to open based on selection of another form

Hello,

I would like some help on how to do the following:

I have a form called "frmpreselect".  In addition to this I have three other 
forms called "FINENTRY", "TBSENTRY", "PSHRMACENTRY".

On form "frmpreselect" I have two fields, one being "DeptID" and "Document 
Type".  These are both combo boxes.   The form also has an open form command 
button.   

What I would like to have the form and button to work as is the following:

If in field "DeptID", the user selects "FIN", then when he presses the open 
form button on "frmpreselect", that the form "FINENTRY" is opened.  If the 
user chooses "TBS", then the form "TBSENTRY" opens.  If the user chooses 
"PSHRMAC", then the form "PSHRMACENTRY" opens.

I have tried to play with the code for the command button to add ifs 
statements, however this has not worked.  

Here is what I had as code.


Private Sub begin_Click()
On Error GoTo Err_begin_Click

    Dim stDocName1 As String
    Dim stLinkCriteria As String
    Dim stfield As String
    Dim DeptID As Field
    Dim stDocName2 As String
    Dim stDocName3 As String
    
 DeptID = "FIN" Or "TBS" Or "PSHRMAC"
 stDocName1 = "FINENTRY"
 stDocName2 = "TBSENTRY"
 stDocName3 = "PSHRMACENTRY"
      
    If DeptID = "FIN" Then stDocName1
    DoCmd.OpenForm stDocName1, , , stLinkCriteria
    Else
    If DeptID = "TBS" Then stDocName2
    DoCmd.OpenForm stDocName2, , , stLinkCriteria
    Else
    If DeptID = "PSHRMAC" Then stDocName3
    DoCmd.OpenForm stDocName3, , , stLinkCriteria
    End If
    
Exit_begin_Click:
    Exit Function

Err_begin_Click:
    MsgBox Err.Description
    Resume Exit_begin_Click
    
End Function
End Sub


If you could tell me what I have wrong with my code or how I should code 
this button to work the way I described above, it would be greatly 
appreciated.

Sincerely,

0
Utf
2/22/2007 5:07:40 AM
access.formscoding 7493 articles. 0 followers. Follow

4 Replies
1002 Views

Similar Articles

[PageSpeed] 50

Hi again Jean-Francois,

Your code is close, but not quite.  Try this:

Private Sub begin_Click()
On Error GoTo Err_begin_Click

    Dim stDocName1 As String
    Dim stDocName2 As String
    Dim stDocName3 As String
    
 stDocName1 = "FINENTRY"
 stDocName2 = "TBSENTRY"
 stDocName3 = "PSHRMACENTRY"
      
    If me.DeptID = "FIN" Then 
      DoCmd.OpenForm stDocName1
    ElseIf me.DeptID = "TBS" Then
      DoCmd.OpenForm stDocName2
    ElseIf me.DeptID = "PSHRMAC" Then 
      DoCmd.OpenForm stDocName3
    End If
    
Exit_begin_Click:
    Exit Function

Err_begin_Click:
    MsgBox Err.Description
    Resume Exit_begin_Click

end sub    

Hope that helps.

Damian.

"Jean-Francois Gauthier" wrote:

> Hello,
> 
> I would like some help on how to do the following:
> 
> I have a form called "frmpreselect".  In addition to this I have three other 
> forms called "FINENTRY", "TBSENTRY", "PSHRMACENTRY".
> 
> On form "frmpreselect" I have two fields, one being "DeptID" and "Document 
> Type".  These are both combo boxes.   The form also has an open form command 
> button.   
> 
> What I would like to have the form and button to work as is the following:
> 
> If in field "DeptID", the user selects "FIN", then when he presses the open 
> form button on "frmpreselect", that the form "FINENTRY" is opened.  If the 
> user chooses "TBS", then the form "TBSENTRY" opens.  If the user chooses 
> "PSHRMAC", then the form "PSHRMACENTRY" opens.
> 
> I have tried to play with the code for the command button to add ifs 
> statements, however this has not worked.  
> 
> Here is what I had as code.
> 
> 
> Private Sub begin_Click()
> On Error GoTo Err_begin_Click
> 
>     Dim stDocName1 As String
>     Dim stLinkCriteria As String
>     Dim stfield As String
>     Dim DeptID As Field
>     Dim stDocName2 As String
>     Dim stDocName3 As String
>     
>  DeptID = "FIN" Or "TBS" Or "PSHRMAC"
>  stDocName1 = "FINENTRY"
>  stDocName2 = "TBSENTRY"
>  stDocName3 = "PSHRMACENTRY"
>       
>     If DeptID = "FIN" Then stDocName1
>     DoCmd.OpenForm stDocName1, , , stLinkCriteria
>     Else
>     If DeptID = "TBS" Then stDocName2
>     DoCmd.OpenForm stDocName2, , , stLinkCriteria
>     Else
>     If DeptID = "PSHRMAC" Then stDocName3
>     DoCmd.OpenForm stDocName3, , , stLinkCriteria
>     End If
>     
> Exit_begin_Click:
>     Exit Function
> 
> Err_begin_Click:
>     MsgBox Err.Description
>     Resume Exit_begin_Click
>     
> End Function
> End Sub
> 
> 
> If you could tell me what I have wrong with my code or how I should code 
> this button to work the way I described above, it would be greatly 
> appreciated.
> 
> Sincerely,
> 
0
Utf
2/22/2007 6:27:00 AM
Hi Damian,

Thanks for your help.

The only issue with your code I see is that I once I hit the open button on 
the form, which should take me to the next form, I get the error message 

"Exit function not aloud in Sub or Property".....then when I click ok it 
takes me to the line "Exit Function" under Exit_Begin_click

Any idea as to why?

Thanks,



"Damian S" wrote:

> Hi again Jean-Francois,
> 
> Your code is close, but not quite.  Try this:
> 
> Private Sub begin_Click()
> On Error GoTo Err_begin_Click
> 
>     Dim stDocName1 As String
>     Dim stDocName2 As String
>     Dim stDocName3 As String
>     
>  stDocName1 = "FINENTRY"
>  stDocName2 = "TBSENTRY"
>  stDocName3 = "PSHRMACENTRY"
>       
>     If me.DeptID = "FIN" Then 
>       DoCmd.OpenForm stDocName1
>     ElseIf me.DeptID = "TBS" Then
>       DoCmd.OpenForm stDocName2
>     ElseIf me.DeptID = "PSHRMAC" Then 
>       DoCmd.OpenForm stDocName3
>     End If
>     
> Exit_begin_Click:
>     Exit Function
> 
> Err_begin_Click:
>     MsgBox Err.Description
>     Resume Exit_begin_Click
> 
> end sub    
> 
> Hope that helps.
> 
> Damian.
> 
> "Jean-Francois Gauthier" wrote:
> 
> > Hello,
> > 
> > I would like some help on how to do the following:
> > 
> > I have a form called "frmpreselect".  In addition to this I have three other 
> > forms called "FINENTRY", "TBSENTRY", "PSHRMACENTRY".
> > 
> > On form "frmpreselect" I have two fields, one being "DeptID" and "Document 
> > Type".  These are both combo boxes.   The form also has an open form command 
> > button.   
> > 
> > What I would like to have the form and button to work as is the following:
> > 
> > If in field "DeptID", the user selects "FIN", then when he presses the open 
> > form button on "frmpreselect", that the form "FINENTRY" is opened.  If the 
> > user chooses "TBS", then the form "TBSENTRY" opens.  If the user chooses 
> > "PSHRMAC", then the form "PSHRMACENTRY" opens.
> > 
> > I have tried to play with the code for the command button to add ifs 
> > statements, however this has not worked.  
> > 
> > Here is what I had as code.
> > 
> > 
> > Private Sub begin_Click()
> > On Error GoTo Err_begin_Click
> > 
> >     Dim stDocName1 As String
> >     Dim stLinkCriteria As String
> >     Dim stfield As String
> >     Dim DeptID As Field
> >     Dim stDocName2 As String
> >     Dim stDocName3 As String
> >     
> >  DeptID = "FIN" Or "TBS" Or "PSHRMAC"
> >  stDocName1 = "FINENTRY"
> >  stDocName2 = "TBSENTRY"
> >  stDocName3 = "PSHRMACENTRY"
> >       
> >     If DeptID = "FIN" Then stDocName1
> >     DoCmd.OpenForm stDocName1, , , stLinkCriteria
> >     Else
> >     If DeptID = "TBS" Then stDocName2
> >     DoCmd.OpenForm stDocName2, , , stLinkCriteria
> >     Else
> >     If DeptID = "PSHRMAC" Then stDocName3
> >     DoCmd.OpenForm stDocName3, , , stLinkCriteria
> >     End If
> >     
> > Exit_begin_Click:
> >     Exit Function
> > 
> > Err_begin_Click:
> >     MsgBox Err.Description
> >     Resume Exit_begin_Click
> >     
> > End Function
> > End Sub
> > 
> > 
> > If you could tell me what I have wrong with my code or how I should code 
> > this button to work the way I described above, it would be greatly 
> > appreciated.
> > 
> > Sincerely,
> > 
0
Utf
2/22/2007 6:37:05 AM
Sorry, that's a copy/paste error from your code earlier.  It should say Exit 
Sub.

Damian.

"Jean-Francois Gauthier" wrote:

> Hi Damian,
> 
> Thanks for your help.
> 
> The only issue with your code I see is that I once I hit the open button on 
> the form, which should take me to the next form, I get the error message 
> 
> "Exit function not aloud in Sub or Property".....then when I click ok it 
> takes me to the line "Exit Function" under Exit_Begin_click
> 
> Any idea as to why?
> 
> Thanks,
> 
> 
> 
> "Damian S" wrote:
> 
> > Hi again Jean-Francois,
> > 
> > Your code is close, but not quite.  Try this:
> > 
> > Private Sub begin_Click()
> > On Error GoTo Err_begin_Click
> > 
> >     Dim stDocName1 As String
> >     Dim stDocName2 As String
> >     Dim stDocName3 As String
> >     
> >  stDocName1 = "FINENTRY"
> >  stDocName2 = "TBSENTRY"
> >  stDocName3 = "PSHRMACENTRY"
> >       
> >     If me.DeptID = "FIN" Then 
> >       DoCmd.OpenForm stDocName1
> >     ElseIf me.DeptID = "TBS" Then
> >       DoCmd.OpenForm stDocName2
> >     ElseIf me.DeptID = "PSHRMAC" Then 
> >       DoCmd.OpenForm stDocName3
> >     End If
> >     
> > Exit_begin_Click:
> >     Exit Function
> > 
> > Err_begin_Click:
> >     MsgBox Err.Description
> >     Resume Exit_begin_Click
> > 
> > end sub    
> > 
> > Hope that helps.
> > 
> > Damian.
> > 
> > "Jean-Francois Gauthier" wrote:
> > 
> > > Hello,
> > > 
> > > I would like some help on how to do the following:
> > > 
> > > I have a form called "frmpreselect".  In addition to this I have three other 
> > > forms called "FINENTRY", "TBSENTRY", "PSHRMACENTRY".
> > > 
> > > On form "frmpreselect" I have two fields, one being "DeptID" and "Document 
> > > Type".  These are both combo boxes.   The form also has an open form command 
> > > button.   
> > > 
> > > What I would like to have the form and button to work as is the following:
> > > 
> > > If in field "DeptID", the user selects "FIN", then when he presses the open 
> > > form button on "frmpreselect", that the form "FINENTRY" is opened.  If the 
> > > user chooses "TBS", then the form "TBSENTRY" opens.  If the user chooses 
> > > "PSHRMAC", then the form "PSHRMACENTRY" opens.
> > > 
> > > I have tried to play with the code for the command button to add ifs 
> > > statements, however this has not worked.  
> > > 
> > > Here is what I had as code.
> > > 
> > > 
> > > Private Sub begin_Click()
> > > On Error GoTo Err_begin_Click
> > > 
> > >     Dim stDocName1 As String
> > >     Dim stLinkCriteria As String
> > >     Dim stfield As String
> > >     Dim DeptID As Field
> > >     Dim stDocName2 As String
> > >     Dim stDocName3 As String
> > >     
> > >  DeptID = "FIN" Or "TBS" Or "PSHRMAC"
> > >  stDocName1 = "FINENTRY"
> > >  stDocName2 = "TBSENTRY"
> > >  stDocName3 = "PSHRMACENTRY"
> > >       
> > >     If DeptID = "FIN" Then stDocName1
> > >     DoCmd.OpenForm stDocName1, , , stLinkCriteria
> > >     Else
> > >     If DeptID = "TBS" Then stDocName2
> > >     DoCmd.OpenForm stDocName2, , , stLinkCriteria
> > >     Else
> > >     If DeptID = "PSHRMAC" Then stDocName3
> > >     DoCmd.OpenForm stDocName3, , , stLinkCriteria
> > >     End If
> > >     
> > > Exit_begin_Click:
> > >     Exit Function
> > > 
> > > Err_begin_Click:
> > >     MsgBox Err.Description
> > >     Resume Exit_begin_Click
> > >     
> > > End Function
> > > End Sub
> > > 
> > > 
> > > If you could tell me what I have wrong with my code or how I should code 
> > > this button to work the way I described above, it would be greatly 
> > > appreciated.
> > > 
> > > Sincerely,
> > > 
0
Utf
2/22/2007 6:46:03 AM
Works like a charm,  thank you very much for your help!!!

Jean-Francois

"Damian S" wrote:

> Sorry, that's a copy/paste error from your code earlier.  It should say Exit 
> Sub.
> 
> Damian.
> 
> "Jean-Francois Gauthier" wrote:
> 
> > Hi Damian,
> > 
> > Thanks for your help.
> > 
> > The only issue with your code I see is that I once I hit the open button on 
> > the form, which should take me to the next form, I get the error message 
> > 
> > "Exit function not aloud in Sub or Property".....then when I click ok it 
> > takes me to the line "Exit Function" under Exit_Begin_click
> > 
> > Any idea as to why?
> > 
> > Thanks,
> > 
> > 
> > 
> > "Damian S" wrote:
> > 
> > > Hi again Jean-Francois,
> > > 
> > > Your code is close, but not quite.  Try this:
> > > 
> > > Private Sub begin_Click()
> > > On Error GoTo Err_begin_Click
> > > 
> > >     Dim stDocName1 As String
> > >     Dim stDocName2 As String
> > >     Dim stDocName3 As String
> > >     
> > >  stDocName1 = "FINENTRY"
> > >  stDocName2 = "TBSENTRY"
> > >  stDocName3 = "PSHRMACENTRY"
> > >       
> > >     If me.DeptID = "FIN" Then 
> > >       DoCmd.OpenForm stDocName1
> > >     ElseIf me.DeptID = "TBS" Then
> > >       DoCmd.OpenForm stDocName2
> > >     ElseIf me.DeptID = "PSHRMAC" Then 
> > >       DoCmd.OpenForm stDocName3
> > >     End If
> > >     
> > > Exit_begin_Click:
> > >     Exit Function
> > > 
> > > Err_begin_Click:
> > >     MsgBox Err.Description
> > >     Resume Exit_begin_Click
> > > 
> > > end sub    
> > > 
> > > Hope that helps.
> > > 
> > > Damian.
> > > 
> > > "Jean-Francois Gauthier" wrote:
> > > 
> > > > Hello,
> > > > 
> > > > I would like some help on how to do the following:
> > > > 
> > > > I have a form called "frmpreselect".  In addition to this I have three other 
> > > > forms called "FINENTRY", "TBSENTRY", "PSHRMACENTRY".
> > > > 
> > > > On form "frmpreselect" I have two fields, one being "DeptID" and "Document 
> > > > Type".  These are both combo boxes.   The form also has an open form command 
> > > > button.   
> > > > 
> > > > What I would like to have the form and button to work as is the following:
> > > > 
> > > > If in field "DeptID", the user selects "FIN", then when he presses the open 
> > > > form button on "frmpreselect", that the form "FINENTRY" is opened.  If the 
> > > > user chooses "TBS", then the form "TBSENTRY" opens.  If the user chooses 
> > > > "PSHRMAC", then the form "PSHRMACENTRY" opens.
> > > > 
> > > > I have tried to play with the code for the command button to add ifs 
> > > > statements, however this has not worked.  
> > > > 
> > > > Here is what I had as code.
> > > > 
> > > > 
> > > > Private Sub begin_Click()
> > > > On Error GoTo Err_begin_Click
> > > > 
> > > >     Dim stDocName1 As String
> > > >     Dim stLinkCriteria As String
> > > >     Dim stfield As String
> > > >     Dim DeptID As Field
> > > >     Dim stDocName2 As String
> > > >     Dim stDocName3 As String
> > > >     
> > > >  DeptID = "FIN" Or "TBS" Or "PSHRMAC"
> > > >  stDocName1 = "FINENTRY"
> > > >  stDocName2 = "TBSENTRY"
> > > >  stDocName3 = "PSHRMACENTRY"
> > > >       
> > > >     If DeptID = "FIN" Then stDocName1
> > > >     DoCmd.OpenForm stDocName1, , , stLinkCriteria
> > > >     Else
> > > >     If DeptID = "TBS" Then stDocName2
> > > >     DoCmd.OpenForm stDocName2, , , stLinkCriteria
> > > >     Else
> > > >     If DeptID = "PSHRMAC" Then stDocName3
> > > >     DoCmd.OpenForm stDocName3, , , stLinkCriteria
> > > >     End If
> > > >     
> > > > Exit_begin_Click:
> > > >     Exit Function
> > > > 
> > > > Err_begin_Click:
> > > >     MsgBox Err.Description
> > > >     Resume Exit_begin_Click
> > > >     
> > > > End Function
> > > > End Sub
> > > > 
> > > > 
> > > > If you could tell me what I have wrong with my code or how I should code 
> > > > this button to work the way I described above, it would be greatly 
> > > > appreciated.
> > > > 
> > > > Sincerely,
> > > > 
0
Utf
2/22/2007 7:10:13 AM
Reply:

Similar Artilces:

How to select series in chart?
I know I asked this question before, but (sigh) I cannot find the answer now, when I need it of course. How can I select a series in an Excel chart (XY Scatter) using the keyboard, not the mouse? The issue is: I have overlapping series, so it is difficult for me to select a series by moving the mouse cursor to a point in one series and right-clicking it, as I normally do. Someone once mentioned a ctrl and/or shift key combination (I think) that would allow me to select each series explicit in round-robin fashion. That is what I am looking for again. More generally, how could I have found...

Opening publisher 97 with a later version
I have publisher 97 on my windows xp and it works fine. However, I had someone refine some work I had done and apparently they used a later version of Publisher because when I loaded their CD, I got the message "Publisher cannot load files from a different version" What can I do--does this mean I have to buy a later version to match the version he used, or do I have to buy one of those programs that can open other programs. If I do the later, will I be able to use my 97 version to make changes once I get the files open on the later version Thanks rjda Refer to http://www.mvps....

open two different Access reports
Hi, I was wondering if i can get some help here. I have two different reports that i want to open when a user clicks a button to view the reports for printing. Is there any way of popping them up at the same time in VBA? Thank you in advance Associates wrote: >Hi, > >I was wondering if i can get some help here. I have two different reports >that i want to open when a user clicks a button to view the reports for >printing. Is there any way of popping them up at the same time in VBA? > >Thank you in advance Yes. Call the DoCmd.OpenReport command twic...

Unable to open Outlook Express after upgrade to Win. XP
I upgraded from windows98 to windows XP Pro. Now when I try to use OE I get two error messages. "Outlook Express could not be started. The application was unable to open the OE message store. Your compter may be out of memory or your disk is full.....0x800c012e,3" "OE could not be started because MSOE.DLL could not be initialized. OE maynot be installd correctly" I found a similiar problem fix for window2000 which said to delete OE, rename the old folder, then edit the registry and reinstall. I did the above but was not allowed to rename the old folder and th...

Opening an *.MSG file with it's respective attachment.
Hello, The file *.MSG is a message file. This can be viewed by any editor, like Notepad. However, when there's an attachment to it, we see garbage. Is there a way to open the attachments present inside the *.MSG files ? Thank you Yes, by opening it with Outlook. -- Roady [MVP] www.sparnaaij.net Microsoft Office and Microsoft Office related News Also Outlook FAQ, How To's, Downloads and more... Tips of the month: -Create your own fully customized Toolbar -Creating a Classic View in Outlook 2003 Subscribe to the newsletter to receive news and tips & tricks in your mailbox!...

Can't open 2005 data file after reinstalling Money 2005
I am experiencing a recurring problem. I have had to reinstall Windows XP and MS Money 2005. I am now unable to open my previously converted 2005 file or restore any backup version. I consistently get the following error message: "Money cannot locate filename or cannot open it, possibly because it is a read-only file, you do not have permission to change it, or your disk drive is write- protected. If you have chosen the correct file and it cannot be accessed, you will need to click OK and then Restore your most recent backup file." Any help or thoughts would be greatly ap...

Word2007. Checkbox. No Form
Hello! We have a document (not a form) that we would like to use checkboxes in. This document has a couple of sections where it would be useful if the user could check if something is applicable. We can't protect the whole document. Thank you for your help! Stacey I actually used this feature in a form this morning. Although you don't say what version of Word you are using, you can access the Control Toolbox toolbar in Word 2003, or in Word 2007, it is on Developer tab. To show the developer tab, click the Microsoft Office Button and then click Word Options. S...

opening .pst archives
I am trying to open an outlook e-mail archive file (pst) that was made when I had Office 98 and transferred to my new computer (Office 2003 Pro). I am looking for an old e-mail that has now become evidence in a lawsuit. Can anyone help? You didn't say if the PST file was on a CDR/RW, hard drive, or network share. In any case, the PST file must be located on a local/network drive where you have full access (read, write, modify, delete, .etc) rights. Once the file is located in said place, you can open the PST file via File | Open | Outlook Data File. To close the PST file when you ...

Macro for Sharepoint List and another Table?? Same # records?
I am creating a database which we have a form made up of prepopulated data (from a sharepoint list) and also data input needed by a user (for example, comments, etc.). I have two tables: one sharepoint list that is linked to sharepoint website and another table that houses the additional user inputs [table 2]. I have linked the files based on the primary key. So, every record in my table 2 has a plus sign and it will expand and you will see the linked data from the sharepoint list. Is there a way that I can automatically create a record for every corresponding record ...

Excel Opens Without Displaying Workbook
I am having issues with opening an Excel file. The file opens, but the workbook is not displayed. I tried the resolution in the article XL97: Excel Opens Without Displaying Workbook (http://support.microsoft.com/default.aspx?scid=kb;en-us;158996&Product=xlw97), but neither of the resolutions fixed the problem. Any suggestions?? Are you using Excel 97? -John Baughman Fort Collins, CO >-----Original Message----- >I am having issues with opening an Excel file. The file opens, but the workbook is not displayed. I tried the resolution in the article XL97: Excel Opens Without Di...

changing values of one field based on another
How can I best change the values of one field in a table based on values of another field of the same table. We have an existing table of thousands of entries and I would like to use the following logic to populate a new boolean field. If field1 = "Done" Then BooleanFieldCompleted = True I have some Excel VBA experience but limited Access. I dont want to do this manually! Any assistance appreciated. In general, you'd use an Update query. However, in this case I don't see why you'd need such a field. Why not just create a query with a computed field that returns True...

Office 2003 Service Pack 3--subsequent problems opening Publisher
I run Publisher 2003 on Windows XP. On June 13, I updated my system with Office 2003 Service Pack 3 so that I could open Word documents with the file ext docx. Subsequent to the Service Pack 3 installation, whenever I open a Publisher file (which I created), I get the following message: "Publisher has detected a problem in the file you are trying to open. If you are certain that this file came from a trusted source and does not contain harmful information, click OK." What is causing this and is there a way to stop this pop-up message? All publications? Error message when you...

Opening pub files created with older Publisher versions #2
I have just upgraded to Publisher 2003 from 2000 and am having trouble with pub files sent to me for our chuch newsletter which is using Publisher 97 The text is not wrapping around graphics boxes. Can I fix this? I really don't want to go back to Pub 200 Thank Richard this is caused by Publisher 97 not been printer independent. Even if you went back to Publisher 2000, unless you have the identical font versions and printer driver you would have issues with formatting. It sounds like the person sending you the file has a garbage HP inkjet printer. Get them to install the HP5P laser p...

Single click selects multiple cells
When clicking on a single cell multiple cells are selected. The one time solution for this is to zoom in or out. This is problematic as 60% seems to be the zoom that works most of the time but at this zoom level the cell contents do not display. The time lost and the frustration that builds is killing my productivity and office attitude. Please give all of us a permanet fix. -- Thanks Mike ---------------- 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" butt...

I would like to know how to set up a 'fill in the blanks' form?
I would like to set up a templet of sorts to fill in the blanks for certificates. ...

Help me identify my missing permission (Cannot open public folder) -2147217843 (Maybe Authentication Fails?)
The following snippet of code throws an error number -2147217843. When I googled this error code, I see many references to authentication failed. I am assuming my problem is some kind of permission related problem on the "MyNewFolder" public folder. -- start code --- Dim objFolder As New CDO.Folder Dim f As ADODB.Field 'sURL is like: file://./backofficestorage/mydomain.com/Public Folders/MyNewFolder/ objFolder.DataSource.Open sURL, , adModeReadWrite, adFailIfNotExists --- end code -- I have code that runs before this that actually creates the "MyNewFolder" publ...

Copying Data in a cell in one sheet to a cell in another sheet
I've run into a problem trying to copy data from a cell in one sheet to another. I have a spreadsheet called "rating" which contains a number of formula that calculates a final number. I also have a spreadsheet called "Final" that copies over the information from "Rating". In "Final", I'm trying to copy a number from "Rating" into a particular cell. I put in =Rating! G89, but it won't work. When I press enter, a window pops up "Update value:Rating". I press enter again and in the cell where I want the number ...

opening a .docx with word 2004
Version: 2004 Operating System: Mac OS X 10.3 (Panther) How can I open a .docx attachment that has been sent to me with word 2004?? Can I convert it somehow at my end or does it have to be converted from the sender end? Thanks for any help... <cscs@sympatico.ca> wrote: > How can I open a .docx attachment that has been sent to me with word > 2004?? Can I convert it somehow at my end or does it have to be > converted from the sender end? Make sure that Office is up to date (or at least in version 11.5.0 - the altest version being 11.5.1) and install the XML convertrs you'...

OLK 2k7
Outlook is behaving strangly with the "through the selected account" option. Each time I restart Outlook the rule fails. When I go in to check on the rules I get told that the rule is "invalid". and the "SELECTED" account is no longer selected. Each time the criteria the account needs to be selected by changes. For example with the following data Account Name Email Account mailserver.domain1.com user@domain1.com mailserver.domain2.com user@domain2.com One time I go in and it's asking me to select the account ...

Effectively stoping open relay.
I have a client who started using exchange 2003 few days back. This client is having more than 12 subnets starting from 172.27.50.0, 172.16.0.0 to 172.27.0.0 and 10.172.172.0 & 10.172.173.0 subnets in different location in town which are conneted by DSL. This users are connecting to the Exchange server 172.16.5.25. Most of these users are POP3 users. I have 2 SMTP Virtual Server running. Default SMTP Virtual server 172.16.5.25 and the second for Externel. In the Mail connector I have added only the external as the local bridgehead server. In the relay properties of the internal I...

Getting rid of selection
How can I get rid of the selection rectangle? It seems that it's always there, with a heavy black rectangle, or there's a light black rectangle marking where it was. I'm trying to get rid of it altogether, so I can capture an image of the sheet for use in a webpage. I can achieve the effect that I want by selecting a cell which is outside the area that I'm trying to capture, but now that I've found that I cannot get rid of it entirely, it is driving me nuts trying to do so. -- Steve Swift http://www.swiftys.org.uk/swifty.html http://www.ringers.org.uk You could al...

Selecting the Right Text Alignment for a edit box doesn't work
When I select right text alignment in the edit control properties, the text is still left aligned when I run the program. What am I doing wrong Thanks Dan Dan, "Dan" <anonymous@discussions.microsoft.com> a �crit dans le message de news:DECFE605-A130-416B-9924-60BA0C79D684@microsoft.com... > When I select right text alignment in the edit control properties, the text is still left aligned when I run the program. What am I doing wrong? > I've no idea :-))) You can open your RC-file as text, and make sure it has the ES_RIGHT style set, thus: EDITTEXT IDC...

Picture control on a form
What is the best way to fill a form with a picture control so that when the client window is resized the picture control will fill the form? -- Just Al Take a look at this and see if this is what you want: http://www.codeproject.com/dialog/bmpdlg01.asp Tom "Al" <Al@discussions.microsoft.com> wrote in message news:5BEA0FA2-3F95-4090-B908-A75DBF1D19DE@microsoft.com... > What is the best way to fill a form with a picture control so that when > the > client window is resized the picture control will fill the form? > -- > Just Al Thank You! -- Just Al &...

Null value in form not trapped by beforeupdate event
I have a form in Access 2003 linked to a SQL Server 2005 table. When I clear the value in a textbox (bound field is varchar and is required), I want the before update event to run to tell the user the value cannot be null. When I press the tab button to move to the next field after clearing the texbox, the before update event is not triggering and instead I'm getting the following error: You tried to assign the Null value to a variable that is not a Variant data type. (Error 3162) How can I prevent nulls before and this error from triggering? Thanks! ...

Accessing another user's calendar OL2000/OL2003/Ex2000
Here's the situation: Running Exchange2000, v 6.0, sp4. Users are on XP/OL2003 or NT/OL2000. (we're in the process of upgrading all of the workstations to XP.) VIP user is on XP/OL2003. He can access his calendar just fine on his workstation. His secretary and other office admin type people are still on NT/OL2000. They have reviewer or editor rights to his calendar. They try to access his calendar by chosing File/Open/Other User's Folder... and put in his name and calendar. When they do this, the process hangs. In Task Manager, Outlook is "Running." End the Outloo...