How can I update a field in another table when using forms?

I have a form that user inputs a protocol number into.  This form is called 
"Protocol_Index".  When the user first inputs this protocol number, right 
after they have to to another form, which they easily do by pressing a button 
that takes them there.  However when I have all the data in the tables for 
both "Couple_Index" and "Protocol_Index" this seems to work fine.  What 
happens is when they are searching for a record based on a protocol number in 
the "Protocol_Index" form they simply press a button to take them to the 
"Couple_Index" form.  Normally the couples information is there to see based 
on the protocol number from the previous form (Protocol_Index).  But this 
only happens when all data is manaully changed.  If I'm creating a new 
record, this doesnt work.

Within the "Couple_Index" table there is a field called "ProtocolIndexID" 
which is a foreign key within this table.  The same field is in the 
"Protocol_Index" table as a primary key.  Like I said above, when the data is 
all there, meaning I have to manually input this in the field 
"ProtocolIndexID" within the "Couple_Index" table.  Is there a way that when 
the user first inputs a new protocol number from the "Protocol_Index" form, 
that it automatically updates the "ProtocolIndexID" field in the 
"Couple_Index" table?
0
Utf
1/15/2008 5:54:04 PM
access 16762 articles. 2 followers. Follow

7 Replies
672 Views

Similar Articles

[PageSpeed] 42

When using liked forms like this you can pass the value to the second form 
via theOpenArgs mechanism.  The code behind the button on the Protocol_Index 
form would be along these lines:

Dim strCriteria As String

' first ensure current record is saved as
' if it’s a new record, then trying to insert
' a new row into the referencing table
' would violate referential integrity if 
' the record in the referenced table
' had not been saved
Me.Dirty = False

strCriteria = " ProtocolIndexID = " & Me.ProtocolIndexID

' open Couple_Index form in dialogue mode
' and pass current ProtocolIndexID to it
DoCmd.OpenForm " Couple_Index", _
    WhereCondtion:=strCriteria, _
    WindowMode:=acDialog, _
    OpenArgs:=Me.ProtocolIndexID

The above assumes that ProtocolIndexID is a number data type.  If it’s a 
text data type use:

strCriteria = " ProtocolIndexID = """ & Me.ProtocolIndexID & """"

In the Couple_Index form's Open event procedure set the DefaultValue 
property of the ProtocolIndexID control to the value (if any) of the OpenArgs 
property:

If Not IsNull(Me.OpenArgs) Then
    Me.ProtocolIndexID.DefaultValue = """" & Me.OpenArgs & """"
End If

Note that the DefaultValue property is always a string expression regardless 
of the data type, so should be wrapped in quotes characters as above.  Often 
this isn't crucial, but sometimes it is (dates are a case in point) so its 
prudent to do so regardless.

BTW if you are interested in more flexible uses of the OpenArgs property, 
such as passing value lists or named arguments, I've posted a demo of a 
module developed some years ago by Stuart McCall and myself for doing this at:


http://community.netscape.com/n/pfx/forum.aspx?nav=libraryMessages&tsn=1&tid=24091&webtag=ws-msdevapps


Another way of doing this would be to use a tab control on a form.  Put the 
Protocol_Index controls on the first page of the tab control and a subform 
(you can use your current Couple_Index form for this) on the second page, 
setting the subform control's LinkMasterFields and LinkChildFields properties 
to ProtocolIndexID.  All you need to do is then tab to the second page.  Any 
new records in the subform will automatically have the ProtocolIndexID value 
inserted via the linking mechanism with no code needed whatsoever.  If you 
wished, and there is enough space to do so, you could do without the tab 
control and have both the Protocol_Index record and the subform containing 
the related records visible simultaneously.

Ken Sheridan
Stafford, England 

"Mike" wrote:

> I have a form that user inputs a protocol number into.  This form is called 
> "Protocol_Index".  When the user first inputs this protocol number, right 
> after they have to to another form, which they easily do by pressing a button 
> that takes them there.  However when I have all the data in the tables for 
> both "Couple_Index" and "Protocol_Index" this seems to work fine.  What 
> happens is when they are searching for a record based on a protocol number in 
> the "Protocol_Index" form they simply press a button to take them to the 
> "Couple_Index" form.  Normally the couples information is there to see based 
> on the protocol number from the previous form (Protocol_Index).  But this 
> only happens when all data is manaully changed.  If I'm creating a new 
> record, this doesnt work.
> 
> Within the "Couple_Index" table there is a field called "ProtocolIndexID" 
> which is a foreign key within this table.  The same field is in the 
> "Protocol_Index" table as a primary key.  Like I said above, when the data is 
> all there, meaning I have to manually input this in the field 
> "ProtocolIndexID" within the "Couple_Index" table.  Is there a way that when 
> the user first inputs a new protocol number from the "Protocol_Index" form, 
> that it automatically updates the "ProtocolIndexID" field in the 
> "Couple_Index" table?

0
Utf
1/15/2008 6:32:00 PM
Hey Ken, thanks for responding to my issue.  You'll have to forgive me if I 
dont understand something that may seem easy.  I've got down your first part 
as far as using the VBA code within the button that opens the "Couple_Index" 
form.  However I'm not exactly sure where to place the second VBA part.  You 
said to place it in the:

In the Couple_Index form's Open event procedure set the DefaultValue 
> property of the ProtocolIndexID control to the value (if any) of the OpenArgs 
> property:

I'm not exactly sure where I could find that.  Would you mean the properties 
for the text box that shows the foreign key?

Michael

"Ken Sheridan" wrote:

> When using liked forms like this you can pass the value to the second form 
> via theOpenArgs mechanism.  The code behind the button on the Protocol_Index 
> form would be along these lines:
> 
> Dim strCriteria As String
> 
> ' first ensure current record is saved as
> ' if it’s a new record, then trying to insert
> ' a new row into the referencing table
> ' would violate referential integrity if 
> ' the record in the referenced table
> ' had not been saved
> Me.Dirty = False
> 
> strCriteria = " ProtocolIndexID = " & Me.ProtocolIndexID
> 
> ' open Couple_Index form in dialogue mode
> ' and pass current ProtocolIndexID to it
> DoCmd.OpenForm " Couple_Index", _
>     WhereCondtion:=strCriteria, _
>     WindowMode:=acDialog, _
>     OpenArgs:=Me.ProtocolIndexID
> 
> The above assumes that ProtocolIndexID is a number data type.  If it’s a 
> text data type use:
> 
> strCriteria = " ProtocolIndexID = """ & Me.ProtocolIndexID & """"
> 
> In the Couple_Index form's Open event procedure set the DefaultValue 
> property of the ProtocolIndexID control to the value (if any) of the OpenArgs 
> property:
> 
> If Not IsNull(Me.OpenArgs) Then
>     Me.ProtocolIndexID.DefaultValue = """" & Me.OpenArgs & """"
> End If
> 
> Note that the DefaultValue property is always a string expression regardless 
> of the data type, so should be wrapped in quotes characters as above.  Often 
> this isn't crucial, but sometimes it is (dates are a case in point) so its 
> prudent to do so regardless.
> 
> BTW if you are interested in more flexible uses of the OpenArgs property, 
> such as passing value lists or named arguments, I've posted a demo of a 
> module developed some years ago by Stuart McCall and myself for doing this at:
> 
> 
> http://community.netscape.com/n/pfx/forum.aspx?nav=libraryMessages&tsn=1&tid=24091&webtag=ws-msdevapps
> 
> 
> Another way of doing this would be to use a tab control on a form.  Put the 
> Protocol_Index controls on the first page of the tab control and a subform 
> (you can use your current Couple_Index form for this) on the second page, 
> setting the subform control's LinkMasterFields and LinkChildFields properties 
> to ProtocolIndexID.  All you need to do is then tab to the second page.  Any 
> new records in the subform will automatically have the ProtocolIndexID value 
> inserted via the linking mechanism with no code needed whatsoever.  If you 
> wished, and there is enough space to do so, you could do without the tab 
> control and have both the Protocol_Index record and the subform containing 
> the related records visible simultaneously.
> 
> Ken Sheridan
> Stafford, England 
> 
> "Mike" wrote:
> 
> > I have a form that user inputs a protocol number into.  This form is called 
> > "Protocol_Index".  When the user first inputs this protocol number, right 
> > after they have to to another form, which they easily do by pressing a button 
> > that takes them there.  However when I have all the data in the tables for 
> > both "Couple_Index" and "Protocol_Index" this seems to work fine.  What 
> > happens is when they are searching for a record based on a protocol number in 
> > the "Protocol_Index" form they simply press a button to take them to the 
> > "Couple_Index" form.  Normally the couples information is there to see based 
> > on the protocol number from the previous form (Protocol_Index).  But this 
> > only happens when all data is manaully changed.  If I'm creating a new 
> > record, this doesnt work.
> > 
> > Within the "Couple_Index" table there is a field called "ProtocolIndexID" 
> > which is a foreign key within this table.  The same field is in the 
> > "Protocol_Index" table as a primary key.  Like I said above, when the data is 
> > all there, meaning I have to manually input this in the field 
> > "ProtocolIndexID" within the "Couple_Index" table.  Is there a way that when 
> > the user first inputs a new protocol number from the "Protocol_Index" form, 
> > that it automatically updates the "ProtocolIndexID" field in the 
> > "Couple_Index" table?
> 
0
Utf
1/15/2008 7:25:03 PM
I assume its the following code you are having problems with:

If Not IsNull(Me.OpenArgs) Then
    Me.ProtocolIndexID.DefaultValue = """" & Me.OpenArgs & """"
End If

This goes in the Open event procedure of the Couple_Index form.  To do this 
open the form in design view.  In the Events tab  of the form's properties 
sheet select the On Open event property.  Click the 'build' button; that's 
the one with the ellipsis (3 dots) to the right.  Select Code Builder in the 
dialogue and when the VBA window opens at the Open event property add the 
code as new lines between the two already in place.

Ken Sheridan
Stafford, England 

"Mike" wrote:

> Hey Ken, thanks for responding to my issue.  You'll have to forgive me if I 
> dont understand something that may seem easy.  I've got down your first part 
> as far as using the VBA code within the button that opens the "Couple_Index" 
> form.  However I'm not exactly sure where to place the second VBA part.  You 
> said to place it in the:
> 
> In the Couple_Index form's Open event procedure set the DefaultValue 
> > property of the ProtocolIndexID control to the value (if any) of the OpenArgs 
> > property:
> 
> I'm not exactly sure where I could find that.  Would you mean the properties 
> for the text box that shows the foreign key?
> 
> Michael
> 
> "Ken Sheridan" wrote:
> 
> > When using liked forms like this you can pass the value to the second form 
> > via theOpenArgs mechanism.  The code behind the button on the Protocol_Index 
> > form would be along these lines:
> > 
> > Dim strCriteria As String
> > 
> > ' first ensure current record is saved as
> > ' if it’s a new record, then trying to insert
> > ' a new row into the referencing table
> > ' would violate referential integrity if 
> > ' the record in the referenced table
> > ' had not been saved
> > Me.Dirty = False
> > 
> > strCriteria = " ProtocolIndexID = " & Me.ProtocolIndexID
> > 
> > ' open Couple_Index form in dialogue mode
> > ' and pass current ProtocolIndexID to it
> > DoCmd.OpenForm " Couple_Index", _
> >     WhereCondtion:=strCriteria, _
> >     WindowMode:=acDialog, _
> >     OpenArgs:=Me.ProtocolIndexID
> > 
> > The above assumes that ProtocolIndexID is a number data type.  If it’s a 
> > text data type use:
> > 
> > strCriteria = " ProtocolIndexID = """ & Me.ProtocolIndexID & """"
> > 
> > In the Couple_Index form's Open event procedure set the DefaultValue 
> > property of the ProtocolIndexID control to the value (if any) of the OpenArgs 
> > property:
> > 
> > If Not IsNull(Me.OpenArgs) Then
> >     Me.ProtocolIndexID.DefaultValue = """" & Me.OpenArgs & """"
> > End If
> > 
> > Note that the DefaultValue property is always a string expression regardless 
> > of the data type, so should be wrapped in quotes characters as above.  Often 
> > this isn't crucial, but sometimes it is (dates are a case in point) so its 
> > prudent to do so regardless.
> > 
> > BTW if you are interested in more flexible uses of the OpenArgs property, 
> > such as passing value lists or named arguments, I've posted a demo of a 
> > module developed some years ago by Stuart McCall and myself for doing this at:
> > 
> > 
> > http://community.netscape.com/n/pfx/forum.aspx?nav=libraryMessages&tsn=1&tid=24091&webtag=ws-msdevapps
> > 
> > 
> > Another way of doing this would be to use a tab control on a form.  Put the 
> > Protocol_Index controls on the first page of the tab control and a subform 
> > (you can use your current Couple_Index form for this) on the second page, 
> > setting the subform control's LinkMasterFields and LinkChildFields properties 
> > to ProtocolIndexID.  All you need to do is then tab to the second page.  Any 
> > new records in the subform will automatically have the ProtocolIndexID value 
> > inserted via the linking mechanism with no code needed whatsoever.  If you 
> > wished, and there is enough space to do so, you could do without the tab 
> > control and have both the Protocol_Index record and the subform containing 
> > the related records visible simultaneously.
> > 
> > Ken Sheridan
> > Stafford, England 
> > 
> > "Mike" wrote:
> > 
> > > I have a form that user inputs a protocol number into.  This form is called 
> > > "Protocol_Index".  When the user first inputs this protocol number, right 
> > > after they have to to another form, which they easily do by pressing a button 
> > > that takes them there.  However when I have all the data in the tables for 
> > > both "Couple_Index" and "Protocol_Index" this seems to work fine.  What 
> > > happens is when they are searching for a record based on a protocol number in 
> > > the "Protocol_Index" form they simply press a button to take them to the 
> > > "Couple_Index" form.  Normally the couples information is there to see based 
> > > on the protocol number from the previous form (Protocol_Index).  But this 
> > > only happens when all data is manaully changed.  If I'm creating a new 
> > > record, this doesnt work.
> > > 
> > > Within the "Couple_Index" table there is a field called "ProtocolIndexID" 
> > > which is a foreign key within this table.  The same field is in the 
> > > "Protocol_Index" table as a primary key.  Like I said above, when the data is 
> > > all there, meaning I have to manually input this in the field 
> > > "ProtocolIndexID" within the "Couple_Index" table.  Is there a way that when 
> > > the user first inputs a new protocol number from the "Protocol_Index" form, 
> > > that it automatically updates the "ProtocolIndexID" field in the 
> > > "Couple_Index" table?
> >

0
Utf
1/16/2008 5:41:02 PM
Hey Ken I really appreciate you help and the fact that you're taking the time 
to be patient with me.  This is whats happening.  After following all of your 
instructions, when I'm on the "Protocol_Index" form and I click on the button 
that pulls up the "Couple_Index" form I recieve a Compile Error: Named 
Argument not found.

This is the current code that lies behind the button:

Private Sub Command56_Click()
On Error GoTo Err_Command56_Click

    Dim stDocName As String
    Dim stLinkCriteria As String
    Dim strCriteria As String

    stDocName = "Couple_IndexFrm"
    
    stLinkCriteria = "[ProtocolIndexID]=" & Me![Protocol Number]
    DoCmd.OpenForm stDocName, , , stLinkCriteria
    
    
    Me.Dirty = False
strCriteria = " ProtocolIndexID = " & Me.ProtocolIndexID
DoCmd.OpenForm " Couple_Index", _
WhereCondtion:=strCriteria, _
WindowMode:=acDialog, _
OpenArgs:=Me.ProtocolIndexID

Exit_Command56_Click:
    Exit Sub

Err_Command56_Click:
    MsgBox Err.Description
    Resume Exit_Command56_Click
    
End Sub

Any suggestions?

"Ken Sheridan" wrote:

> I assume its the following code you are having problems with:
> 
> If Not IsNull(Me.OpenArgs) Then
>     Me.ProtocolIndexID.DefaultValue = """" & Me.OpenArgs & """"
> End If
> 
> This goes in the Open event procedure of the Couple_Index form.  To do this 
> open the form in design view.  In the Events tab  of the form's properties 
> sheet select the On Open event property.  Click the 'build' button; that's 
> the one with the ellipsis (3 dots) to the right.  Select Code Builder in the 
> dialogue and when the VBA window opens at the Open event property add the 
> code as new lines between the two already in place.
> 
> Ken Sheridan
> Stafford, England 
> 
> "Mike" wrote:
> 
> > Hey Ken, thanks for responding to my issue.  You'll have to forgive me if I 
> > dont understand something that may seem easy.  I've got down your first part 
> > as far as using the VBA code within the button that opens the "Couple_Index" 
> > form.  However I'm not exactly sure where to place the second VBA part.  You 
> > said to place it in the:
> > 
> > In the Couple_Index form's Open event procedure set the DefaultValue 
> > > property of the ProtocolIndexID control to the value (if any) of the OpenArgs 
> > > property:
> > 
> > I'm not exactly sure where I could find that.  Would you mean the properties 
> > for the text box that shows the foreign key?
> > 
> > Michael
> > 
> > "Ken Sheridan" wrote:
> > 
> > > When using liked forms like this you can pass the value to the second form 
> > > via theOpenArgs mechanism.  The code behind the button on the Protocol_Index 
> > > form would be along these lines:
> > > 
> > > Dim strCriteria As String
> > > 
> > > ' first ensure current record is saved as
> > > ' if it’s a new record, then trying to insert
> > > ' a new row into the referencing table
> > > ' would violate referential integrity if 
> > > ' the record in the referenced table
> > > ' had not been saved
> > > Me.Dirty = False
> > > 
> > > strCriteria = " ProtocolIndexID = " & Me.ProtocolIndexID
> > > 
> > > ' open Couple_Index form in dialogue mode
> > > ' and pass current ProtocolIndexID to it
> > > DoCmd.OpenForm " Couple_Index", _
> > >     WhereCondtion:=strCriteria, _
> > >     WindowMode:=acDialog, _
> > >     OpenArgs:=Me.ProtocolIndexID
> > > 
> > > The above assumes that ProtocolIndexID is a number data type.  If it’s a 
> > > text data type use:
> > > 
> > > strCriteria = " ProtocolIndexID = """ & Me.ProtocolIndexID & """"
> > > 
> > > In the Couple_Index form's Open event procedure set the DefaultValue 
> > > property of the ProtocolIndexID control to the value (if any) of the OpenArgs 
> > > property:
> > > 
> > > If Not IsNull(Me.OpenArgs) Then
> > >     Me.ProtocolIndexID.DefaultValue = """" & Me.OpenArgs & """"
> > > End If
> > > 
> > > Note that the DefaultValue property is always a string expression regardless 
> > > of the data type, so should be wrapped in quotes characters as above.  Often 
> > > this isn't crucial, but sometimes it is (dates are a case in point) so its 
> > > prudent to do so regardless.
> > > 
> > > BTW if you are interested in more flexible uses of the OpenArgs property, 
> > > such as passing value lists or named arguments, I've posted a demo of a 
> > > module developed some years ago by Stuart McCall and myself for doing this at:
> > > 
> > > 
> > > http://community.netscape.com/n/pfx/forum.aspx?nav=libraryMessages&tsn=1&tid=24091&webtag=ws-msdevapps
> > > 
> > > 
> > > Another way of doing this would be to use a tab control on a form.  Put the 
> > > Protocol_Index controls on the first page of the tab control and a subform 
> > > (you can use your current Couple_Index form for this) on the second page, 
> > > setting the subform control's LinkMasterFields and LinkChildFields properties 
> > > to ProtocolIndexID.  All you need to do is then tab to the second page.  Any 
> > > new records in the subform will automatically have the ProtocolIndexID value 
> > > inserted via the linking mechanism with no code needed whatsoever.  If you 
> > > wished, and there is enough space to do so, you could do without the tab 
> > > control and have both the Protocol_Index record and the subform containing 
> > > the related records visible simultaneously.
> > > 
> > > Ken Sheridan
> > > Stafford, England 
> > > 
> > > "Mike" wrote:
> > > 
> > > > I have a form that user inputs a protocol number into.  This form is called 
> > > > "Protocol_Index".  When the user first inputs this protocol number, right 
> > > > after they have to to another form, which they easily do by pressing a button 
> > > > that takes them there.  However when I have all the data in the tables for 
> > > > both "Couple_Index" and "Protocol_Index" this seems to work fine.  What 
> > > > happens is when they are searching for a record based on a protocol number in 
> > > > the "Protocol_Index" form they simply press a button to take them to the 
> > > > "Couple_Index" form.  Normally the couples information is there to see based 
> > > > on the protocol number from the previous form (Protocol_Index).  But this 
> > > > only happens when all data is manaully changed.  If I'm creating a new 
> > > > record, this doesnt work.
> > > > 
> > > > Within the "Couple_Index" table there is a field called "ProtocolIndexID" 
> > > > which is a foreign key within this table.  The same field is in the 
> > > > "Protocol_Index" table as a primary key.  Like I said above, when the data is 
> > > > all there, meaning I have to manually input this in the field 
> > > > "ProtocolIndexID" within the "Couple_Index" table.  Is there a way that when 
> > > > the user first inputs a new protocol number from the "Protocol_Index" form, 
> > > > that it automatically updates the "ProtocolIndexID" field in the 
> > > > "Couple_Index" table?
> > >
> 
0
Utf
1/16/2008 6:20:04 PM
Partly a typo on my part (missing i in WhereCondition), partly duplication of 
code by you.  It should be like this:

Private Sub Command56_Click()
On Error GoTo Err_Command56_Click

    Dim strDocName As String
    Dim strCriteria As String

    strDocName = "Couple_IndexFrm"
    strCriteria = "ProtocolIndexID=" & Me.[Protocol Number]
    
    Me.Dirty = False

    DoCmd.OpenForm strDocName, _
        WhereCondition:=strCriteria, _
        WindowMode:=acDialog, _
        OpenArgs:=Me.ProtocolIndexID

Exit_Command56_Click:
    Exit Sub

Err_Command56_Click:
    MsgBox Err.Description
    Resume Exit_Command56_Click
    
End Sub


Ken Sheridan
Stafford, England 

"Mike" wrote:

> Hey Ken I really appreciate you help and the fact that you're taking the time 
> to be patient with me.  This is whats happening.  After following all of your 
> instructions, when I'm on the "Protocol_Index" form and I click on the button 
> that pulls up the "Couple_Index" form I recieve a Compile Error: Named 
> Argument not found.
> 
> This is the current code that lies behind the button:
> 
> Private Sub Command56_Click()
> On Error GoTo Err_Command56_Click
> 
>     Dim stDocName As String
>     Dim stLinkCriteria As String
>     Dim strCriteria As String
> 
>     stDocName = "Couple_IndexFrm"
>     
>     stLinkCriteria = "[ProtocolIndexID]=" & Me![Protocol Number]
>     DoCmd.OpenForm stDocName, , , stLinkCriteria
>     
>     
>     Me.Dirty = False
> strCriteria = " ProtocolIndexID = " & Me.ProtocolIndexID
> DoCmd.OpenForm " Couple_Index", _
> WhereCondtion:=strCriteria, _
> WindowMode:=acDialog, _
> OpenArgs:=Me.ProtocolIndexID
> 
> Exit_Command56_Click:
>     Exit Sub
> 
> Err_Command56_Click:
>     MsgBox Err.Description
>     Resume Exit_Command56_Click
>     
> End Sub
> 
> Any suggestions?
> 
> "Ken Sheridan" wrote:
> 
> > I assume its the following code you are having problems with:
> > 
> > If Not IsNull(Me.OpenArgs) Then
> >     Me.ProtocolIndexID.DefaultValue = """" & Me.OpenArgs & """"
> > End If
> > 
> > This goes in the Open event procedure of the Couple_Index form.  To do this 
> > open the form in design view.  In the Events tab  of the form's properties 
> > sheet select the On Open event property.  Click the 'build' button; that's 
> > the one with the ellipsis (3 dots) to the right.  Select Code Builder in the 
> > dialogue and when the VBA window opens at the Open event property add the 
> > code as new lines between the two already in place.
> > 
> > Ken Sheridan
> > Stafford, England 
> > 
> > "Mike" wrote:
> > 
> > > Hey Ken, thanks for responding to my issue.  You'll have to forgive me if I 
> > > dont understand something that may seem easy.  I've got down your first part 
> > > as far as using the VBA code within the button that opens the "Couple_Index" 
> > > form.  However I'm not exactly sure where to place the second VBA part.  You 
> > > said to place it in the:
> > > 
> > > In the Couple_Index form's Open event procedure set the DefaultValue 
> > > > property of the ProtocolIndexID control to the value (if any) of the OpenArgs 
> > > > property:
> > > 
> > > I'm not exactly sure where I could find that.  Would you mean the properties 
> > > for the text box that shows the foreign key?
> > > 
> > > Michael
> > > 
> > > "Ken Sheridan" wrote:
> > > 
> > > > When using liked forms like this you can pass the value to the second form 
> > > > via theOpenArgs mechanism.  The code behind the button on the Protocol_Index 
> > > > form would be along these lines:
> > > > 
> > > > Dim strCriteria As String
> > > > 
> > > > ' first ensure current record is saved as
> > > > ' if it’s a new record, then trying to insert
> > > > ' a new row into the referencing table
> > > > ' would violate referential integrity if 
> > > > ' the record in the referenced table
> > > > ' had not been saved
> > > > Me.Dirty = False
> > > > 
> > > > strCriteria = " ProtocolIndexID = " & Me.ProtocolIndexID
> > > > 
> > > > ' open Couple_Index form in dialogue mode
> > > > ' and pass current ProtocolIndexID to it
> > > > DoCmd.OpenForm " Couple_Index", _
> > > >     WhereCondtion:=strCriteria, _
> > > >     WindowMode:=acDialog, _
> > > >     OpenArgs:=Me.ProtocolIndexID
> > > > 
> > > > The above assumes that ProtocolIndexID is a number data type.  If it’s a 
> > > > text data type use:
> > > > 
> > > > strCriteria = " ProtocolIndexID = """ & Me.ProtocolIndexID & """"
> > > > 
> > > > In the Couple_Index form's Open event procedure set the DefaultValue 
> > > > property of the ProtocolIndexID control to the value (if any) of the OpenArgs 
> > > > property:
> > > > 
> > > > If Not IsNull(Me.OpenArgs) Then
> > > >     Me.ProtocolIndexID.DefaultValue = """" & Me.OpenArgs & """"
> > > > End If
> > > > 
> > > > Note that the DefaultValue property is always a string expression regardless 
> > > > of the data type, so should be wrapped in quotes characters as above.  Often 
> > > > this isn't crucial, but sometimes it is (dates are a case in point) so its 
> > > > prudent to do so regardless.
> > > > 
> > > > BTW if you are interested in more flexible uses of the OpenArgs property, 
> > > > such as passing value lists or named arguments, I've posted a demo of a 
> > > > module developed some years ago by Stuart McCall and myself for doing this at:
> > > > 
> > > > 
> > > > http://community.netscape.com/n/pfx/forum.aspx?nav=libraryMessages&tsn=1&tid=24091&webtag=ws-msdevapps
> > > > 
> > > > 
> > > > Another way of doing this would be to use a tab control on a form.  Put the 
> > > > Protocol_Index controls on the first page of the tab control and a subform 
> > > > (you can use your current Couple_Index form for this) on the second page, 
> > > > setting the subform control's LinkMasterFields and LinkChildFields properties 
> > > > to ProtocolIndexID.  All you need to do is then tab to the second page.  Any 
> > > > new records in the subform will automatically have the ProtocolIndexID value 
> > > > inserted via the linking mechanism with no code needed whatsoever.  If you 
> > > > wished, and there is enough space to do so, you could do without the tab 
> > > > control and have both the Protocol_Index record and the subform containing 
> > > > the related records visible simultaneously.
> > > > 
> > > > Ken Sheridan
> > > > Stafford, England 
> > > > 
> > > > "Mike" wrote:
> > > > 
> > > > > I have a form that user inputs a protocol number into.  This form is called 
> > > > > "Protocol_Index".  When the user first inputs this protocol number, right 
> > > > > after they have to to another form, which they easily do by pressing a button 
> > > > > that takes them there.  However when I have all the data in the tables for 
> > > > > both "Couple_Index" and "Protocol_Index" this seems to work fine.  What 
> > > > > happens is when they are searching for a record based on a protocol number in 
> > > > > the "Protocol_Index" form they simply press a button to take them to the 
> > > > > "Couple_Index" form.  Normally the couples information is there to see based 
> > > > > on the protocol number from the previous form (Protocol_Index).  But this 
> > > > > only happens when all data is manaully changed.  If I'm creating a new 
> > > > > record, this doesnt work.
> > > > > 
> > > > > Within the "Couple_Index" table there is a field called "ProtocolIndexID" 
> > > > > which is a foreign key within this table.  The same field is in the 
> > > > > "Protocol_Index" table as a primary key.  Like I said above, when the data is 
> > > > > all there, meaning I have to manually input this in the field 
> > > > > "ProtocolIndexID" within the "Couple_Index" table.  Is there a way that when 
> > > > > the user first inputs a new protocol number from the "Protocol_Index" form, 
> > > > > that it automatically updates the "ProtocolIndexID" field in the 
> > > > > "Couple_Index" table?
> > > >
> > do it.

0
Utf
1/17/2008 12:47:00 PM
Hey Ken!  It seems to be working as far as putting the newly created Protocol 
Number in the "ProtocolIndexID" field within the "Couple_Index" table.  
However now the button (Couples button on "Protocol_IndexFrm") the way it use 
to.  At any given protocol number showing on the "Protocol_IndexFrm" it would 
immediately go to the related record on the "Couple_IndexFrm" when selected.  
Is this something that cannot be compromised or can it work with that option 
as well?  If so, how?  Thanks again for all your help!

"Ken Sheridan" wrote:

> Partly a typo on my part (missing i in WhereCondition), partly duplication of 
> code by you.  It should be like this:
> 
> Private Sub Command56_Click()
> On Error GoTo Err_Command56_Click
> 
>     Dim strDocName As String
>     Dim strCriteria As String
> 
>     strDocName = "Couple_IndexFrm"
>     strCriteria = "ProtocolIndexID=" & Me.[Protocol Number]
>     
>     Me.Dirty = False
> 
>     DoCmd.OpenForm strDocName, _
>         WhereCondition:=strCriteria, _
>         WindowMode:=acDialog, _
>         OpenArgs:=Me.ProtocolIndexID
> 
> Exit_Command56_Click:
>     Exit Sub
> 
> Err_Command56_Click:
>     MsgBox Err.Description
>     Resume Exit_Command56_Click
>     
> End Sub
> 
> 
> Ken Sheridan
> Stafford, England 
> 
> "Mike" wrote:
> 
> > Hey Ken I really appreciate you help and the fact that you're taking the time 
> > to be patient with me.  This is whats happening.  After following all of your 
> > instructions, when I'm on the "Protocol_Index" form and I click on the button 
> > that pulls up the "Couple_Index" form I recieve a Compile Error: Named 
> > Argument not found.
> > 
> > This is the current code that lies behind the button:
> > 
> > Private Sub Command56_Click()
> > On Error GoTo Err_Command56_Click
> > 
> >     Dim stDocName As String
> >     Dim stLinkCriteria As String
> >     Dim strCriteria As String
> > 
> >     stDocName = "Couple_IndexFrm"
> >     
> >     stLinkCriteria = "[ProtocolIndexID]=" & Me![Protocol Number]
> >     DoCmd.OpenForm stDocName, , , stLinkCriteria
> >     
> >     
> >     Me.Dirty = False
> > strCriteria = " ProtocolIndexID = " & Me.ProtocolIndexID
> > DoCmd.OpenForm " Couple_Index", _
> > WhereCondtion:=strCriteria, _
> > WindowMode:=acDialog, _
> > OpenArgs:=Me.ProtocolIndexID
> > 
> > Exit_Command56_Click:
> >     Exit Sub
> > 
> > Err_Command56_Click:
> >     MsgBox Err.Description
> >     Resume Exit_Command56_Click
> >     
> > End Sub
> > 
> > Any suggestions?
> > 
> > "Ken Sheridan" wrote:
> > 
> > > I assume its the following code you are having problems with:
> > > 
> > > If Not IsNull(Me.OpenArgs) Then
> > >     Me.ProtocolIndexID.DefaultValue = """" & Me.OpenArgs & """"
> > > End If
> > > 
> > > This goes in the Open event procedure of the Couple_Index form.  To do this 
> > > open the form in design view.  In the Events tab  of the form's properties 
> > > sheet select the On Open event property.  Click the 'build' button; that's 
> > > the one with the ellipsis (3 dots) to the right.  Select Code Builder in the 
> > > dialogue and when the VBA window opens at the Open event property add the 
> > > code as new lines between the two already in place.
> > > 
> > > Ken Sheridan
> > > Stafford, England 
> > > 
> > > "Mike" wrote:
> > > 
> > > > Hey Ken, thanks for responding to my issue.  You'll have to forgive me if I 
> > > > dont understand something that may seem easy.  I've got down your first part 
> > > > as far as using the VBA code within the button that opens the "Couple_Index" 
> > > > form.  However I'm not exactly sure where to place the second VBA part.  You 
> > > > said to place it in the:
> > > > 
> > > > In the Couple_Index form's Open event procedure set the DefaultValue 
> > > > > property of the ProtocolIndexID control to the value (if any) of the OpenArgs 
> > > > > property:
> > > > 
> > > > I'm not exactly sure where I could find that.  Would you mean the properties 
> > > > for the text box that shows the foreign key?
> > > > 
> > > > Michael
> > > > 
> > > > "Ken Sheridan" wrote:
> > > > 
> > > > > When using liked forms like this you can pass the value to the second form 
> > > > > via theOpenArgs mechanism.  The code behind the button on the Protocol_Index 
> > > > > form would be along these lines:
> > > > > 
> > > > > Dim strCriteria As String
> > > > > 
> > > > > ' first ensure current record is saved as
> > > > > ' if it’s a new record, then trying to insert
> > > > > ' a new row into the referencing table
> > > > > ' would violate referential integrity if 
> > > > > ' the record in the referenced table
> > > > > ' had not been saved
> > > > > Me.Dirty = False
> > > > > 
> > > > > strCriteria = " ProtocolIndexID = " & Me.ProtocolIndexID
> > > > > 
> > > > > ' open Couple_Index form in dialogue mode
> > > > > ' and pass current ProtocolIndexID to it
> > > > > DoCmd.OpenForm " Couple_Index", _
> > > > >     WhereCondtion:=strCriteria, _
> > > > >     WindowMode:=acDialog, _
> > > > >     OpenArgs:=Me.ProtocolIndexID
> > > > > 
> > > > > The above assumes that ProtocolIndexID is a number data type.  If it’s a 
> > > > > text data type use:
> > > > > 
> > > > > strCriteria = " ProtocolIndexID = """ & Me.ProtocolIndexID & """"
> > > > > 
> > > > > In the Couple_Index form's Open event procedure set the DefaultValue 
> > > > > property of the ProtocolIndexID control to the value (if any) of the OpenArgs 
> > > > > property:
> > > > > 
> > > > > If Not IsNull(Me.OpenArgs) Then
> > > > >     Me.ProtocolIndexID.DefaultValue = """" & Me.OpenArgs & """"
> > > > > End If
> > > > > 
> > > > > Note that the DefaultValue property is always a string expression regardless 
> > > > > of the data type, so should be wrapped in quotes characters as above.  Often 
> > > > > this isn't crucial, but sometimes it is (dates are a case in point) so its 
> > > > > prudent to do so regardless.
> > > > > 
> > > > > BTW if you are interested in more flexible uses of the OpenArgs property, 
> > > > > such as passing value lists or named arguments, I've posted a demo of a 
> > > > > module developed some years ago by Stuart McCall and myself for doing this at:
> > > > > 
> > > > > 
> > > > > http://community.netscape.com/n/pfx/forum.aspx?nav=libraryMessages&tsn=1&tid=24091&webtag=ws-msdevapps
> > > > > 
> > > > > 
> > > > > Another way of doing this would be to use a tab control on a form.  Put the 
> > > > > Protocol_Index controls on the first page of the tab control and a subform 
> > > > > (you can use your current Couple_Index form for this) on the second page, 
> > > > > setting the subform control's LinkMasterFields and LinkChildFields properties 
> > > > > to ProtocolIndexID.  All you need to do is then tab to the second page.  Any 
> > > > > new records in the subform will automatically have the ProtocolIndexID value 
> > > > > inserted via the linking mechanism with no code needed whatsoever.  If you 
> > > > > wished, and there is enough space to do so, you could do without the tab 
> > > > > control and have both the Protocol_Index record and the subform containing 
> > > > > the related records visible simultaneously.
> > > > > 
> > > > > Ken Sheridan
> > > > > Stafford, England 
> > > > > 
> > > > > "Mike" wrote:
> > > > > 
> > > > > > I have a form that user inputs a protocol number into.  This form is called 
> > > > > > "Protocol_Index".  When the user first inputs this protocol number, right 
> > > > > > after they have to to another form, which they easily do by pressing a button 
> > > > > > that takes them there.  However when I have all the data in the tables for 
> > > > > > both "Couple_Index" and "Protocol_Index" this seems to work fine.  What 
> > > > > > happens is when they are searching for a record based on a protocol number in 
> > > > > > the "Protocol_Index" form they simply press a button to take them to the 
> > > > > > "Couple_Index" form.  Normally the couples information is there to see based 
> > > > > > on the protocol number from the previous form (Protocol_Index).  But this 
> > > > > > only happens when all data is manaully changed.  If I'm creating a new 
> > > > > > record, this doesnt work.
> > > > > > 
> > > > > > Within the "Couple_Index" table there is a field called "ProtocolIndexID" 
> > > > > > which is a foreign key within this table.  The same field is in the 
> > > > > > "Protocol_Index" table as a primary key.  Like I said above, when the data is 
> > > > > > all there, meaning I have to manually input this in the field 
> > > > > > "ProtocolIndexID" within the "Couple_Index" table.  Is there a way that when 
> > > > > > the user first inputs a new protocol number from the "Protocol_Index" form, 
> > > > > > that it automatically updates the "ProtocolIndexID" field in the 
> > > > > > "Couple_Index" table?
> > > > >
> > > do it.
> 
0
Utf
1/17/2008 3:58:00 PM
It should be doing that already.  The WhereCondition setting of the OpenForm 
method sets the Filter property of the form being opened and applies the 
filter, so if any records exist in the Couple_Index table with a 
ProtocolIndexID  which matches the current Protocol Number the form should 
open filtered to those records.  If there are no records then it will be at a 
new record and the DefaultValue property of the  ProtocolIndexID control will 
be set to the current Protocol Number.  If only the latter is happening then 
the only reason I can think of for this would be if the Couple_IndexFrm 
form's DataEntry property is set to True (Yes in the form's properties 
sheet).  If this property is True it limits the form to the entry of new 
records, so existing ones don't show.  Check this out and if it is, set it to 
False (No).

Ken Sheridan
Stafford, England

"Mike" wrote:

> Hey Ken!  It seems to be working as far as putting the newly created Protocol 
> Number in the "ProtocolIndexID" field within the "Couple_Index" table.  
> However now the button (Couples button on "Protocol_IndexFrm") the way it use 
> to.  At any given protocol number showing on the "Protocol_IndexFrm" it would 
> immediately go to the related record on the "Couple_IndexFrm" when selected.  
> Is this something that cannot be compromised or can it work with that option 
> as well?  If so, how?  Thanks again for all your help!
> 
> "Ken Sheridan" wrote:
> 
> > Partly a typo on my part (missing i in WhereCondition), partly duplication of 
> > code by you.  It should be like this:
> > 
> > Private Sub Command56_Click()
> > On Error GoTo Err_Command56_Click
> > 
> >     Dim strDocName As String
> >     Dim strCriteria As String
> > 
> >     strDocName = "Couple_IndexFrm"
> >     strCriteria = "ProtocolIndexID=" & Me.[ Protocol Number]
> >     
> >     Me.Dirty = False
> > 
> >     DoCmd.OpenForm strDocName, _
> >         WhereCondition:=strCriteria, _
> >         WindowMode:=acDialog, _
> >         OpenArgs:=Me.ProtocolIndexID
> > 
> > Exit_Command56_Click:
> >     Exit Sub
> > 
> > Err_Command56_Click:
> >     MsgBox Err.Description
> >     Resume Exit_Command56_Click
> >     
> > End Sub
> > 
> > 
> > Ken Sheridan
> > Stafford, England 
> > 
> > "Mike" wrote:
> > 
> > > Hey Ken I really appreciate you help and the fact that you're taking the time 
> > > to be patient with me.  This is whats happening.  After following all of your 
> > > instructions, when I'm on the "Protocol_Index" form and I click on the button 
> > > that pulls up the "Couple_Index" form I recieve a Compile Error: Named 
> > > Argument not found.
> > > 
> > > This is the current code that lies behind the button:
> > > 
> > > Private Sub Command56_Click()
> > > On Error GoTo Err_Command56_Click
> > > 
> > >     Dim stDocName As String
> > >     Dim stLinkCriteria As String
> > >     Dim strCriteria As String
> > > 
> > >     stDocName = "Couple_IndexFrm"
> > >     
> > >     stLinkCriteria = "[ProtocolIndexID]=" & Me![Protocol Number]
> > >     DoCmd.OpenForm stDocName, , , stLinkCriteria
> > >     
> > >     
> > >     Me.Dirty = False
> > > strCriteria = " ProtocolIndexID = " & Me.ProtocolIndexID
> > > DoCmd.OpenForm " Couple_Index", _
> > > WhereCondtion:=strCriteria, _
> > > WindowMode:=acDialog, _
> > > OpenArgs:=Me.ProtocolIndexID
> > > 
> > > Exit_Command56_Click:
> > >     Exit Sub
> > > 
> > > Err_Command56_Click:
> > >     MsgBox Err.Description
> > >     Resume Exit_Command56_Click
> > >     
> > > End Sub
> > > 
> > > Any suggestions?
> > > 
> > > "Ken Sheridan" wrote:
> > > 
> > > > I assume its the following code you are having problems with:
> > > > 
> > > > If Not IsNull(Me.OpenArgs) Then
> > > >     Me.ProtocolIndexID.DefaultValue = """" & Me.OpenArgs & """"
> > > > End If
> > > > 
> > > > This goes in the Open event procedure of the Couple_Index form.  To do this 
> > > > open the form in design view.  In the Events tab  of the form's properties 
> > > > sheet select the On Open event property.  Click the 'build' button; that's 
> > > > the one with the ellipsis (3 dots) to the right.  Select Code Builder in the 
> > > > dialogue and when the VBA window opens at the Open event property add the 
> > > > code as new lines between the two already in place.
> > > > 
> > > > Ken Sheridan
> > > > Stafford, England 
> > > > 
> > > > "Mike" wrote:
> > > > 
> > > > > Hey Ken, thanks for responding to my issue.  You'll have to forgive me if I 
> > > > > dont understand something that may seem easy.  I've got down your first part 
> > > > > as far as using the VBA code within the button that opens the "Couple_Index" 
> > > > > form.  However I'm not exactly sure where to place the second VBA part.  You 
> > > > > said to place it in the:
> > > > > 
> > > > > In the Couple_Index form's Open event procedure set the DefaultValue 
> > > > > > property of the ProtocolIndexID control to the value (if any) of the OpenArgs 
> > > > > > property:
> > > > > 
> > > > > I'm not exactly sure where I could find that.  Would you mean the properties 
> > > > > for the text box that shows the foreign key?
> > > > > 
> > > > > Michael
> > > > > 
> > > > > "Ken Sheridan" wrote:
> > > > > 
> > > > > > When using liked forms like this you can pass the value to the second form 
> > > > > > via theOpenArgs mechanism.  The code behind the button on the Protocol_Index 
> > > > > > form would be along these lines:
> > > > > > 
> > > > > > Dim strCriteria As String
> > > > > > 
> > > > > > ' first ensure current record is saved as
> > > > > > ' if it’s a new record, then trying to insert
> > > > > > ' a new row into the referencing table
> > > > > > ' would violate referential integrity if 
> > > > > > ' the record in the referenced table
> > > > > > ' had not been saved
> > > > > > Me.Dirty = False
> > > > > > 
> > > > > > strCriteria = " ProtocolIndexID = " & Me.ProtocolIndexID
> > > > > > 
> > > > > > ' open Couple_Index form in dialogue mode
> > > > > > ' and pass current ProtocolIndexID to it
> > > > > > DoCmd.OpenForm " Couple_Index", _
> > > > > >     WhereCondtion:=strCriteria, _
> > > > > >     WindowMode:=acDialog, _
> > > > > >     OpenArgs:=Me.ProtocolIndexID
> > > > > > 
> > > > > > The above assumes that ProtocolIndexID is a number data type.  If it’s a 
> > > > > > text data type use:
> > > > > > 
> > > > > > strCriteria = " ProtocolIndexID = """ & Me.ProtocolIndexID & """"
> > > > > > 
> > > > > > In the Couple_Index form's Open event procedure set the DefaultValue 
> > > > > > property of the ProtocolIndexID control to the value (if any) of the OpenArgs 
> > > > > > property:
> > > > > > 
> > > > > > If Not IsNull(Me.OpenArgs) Then
> > > > > >     Me.ProtocolIndexID.DefaultValue = """" & Me.OpenArgs & """"
> > > > > > End If
> > > > > > 
> > > > > > Note that the DefaultValue property is always a string expression regardless 
> > > > > > of the data type, so should be wrapped in quotes characters as above.  Often 
> > > > > > this isn't crucial, but sometimes it is (dates are a case in point) so its 
> > > > > > prudent to do so regardless.
> > > > > > 
> > > > > > BTW if you are interested in more flexible uses of the OpenArgs property, 
> > > > > > such as passing value lists or named arguments, I've posted a demo of a 
> > > > > > module developed some years ago by Stuart McCall and myself for doing this at:
> > > > > > 
> > > > > > 
> > > > > > http://community.netscape.com/n/pfx/forum.aspx?nav=libraryMessages&tsn=1&tid=24091&webtag=ws-msdevapps
> > > > > > 
> > > > > > 
> > > > > > Another way of doing this would be to use a tab control on a form.  Put the 
> > > > > > Protocol_Index controls on the first page of the tab control and a subform 
> > > > > > (you can use your current Couple_Index form for this) on the second page, 
> > > > > > setting the subform control's LinkMasterFields and LinkChildFields properties 
> > > > > > to ProtocolIndexID.  All you need to do is then tab to the second page.  Any 
> > > > > > new records in the subform will automatically have the ProtocolIndexID value 
> > > > > > inserted via the linking mechanism with no code needed whatsoever.  If you 
> > > > > > wished, and there is enough space to do so, you could do without the tab 
> > > > > > control and have both the Protocol_Index record and the subform containing 
> > > > > > the related records visible simultaneously.
> > > > > > 
> > > > > > Ken Sheridan
> > > > > > Stafford, England 
> > > > > > 
> > > > > > "Mike" wrote:
> > > > > > 
> > > > > > > I have a form that user inputs a protocol number into.  This form is called 
> > > > > > > "Protocol_Index".  When the user first inputs this protocol number, right 
> > > > > > > after they have to to another form, which they easily do by pressing a button 
> > > > > > > that takes them there.  However when I have all the data in the tables for 
> > > > > > > both "Couple_Index" and "Protocol_Index" this seems to work fine.  What 
> > > > > > > happens is when they are searching for a record based on a protocol number in 
> > > > > > > the "Protocol_Index" form they simply press a button to take them to the 
> > > > > > > "Couple_Index" form.  Normally the couples information is there to see based 
> > > > > > > on the protocol number from the previous form (Protocol_Index).  But this 
> > > > > > > only happens when all data is manaully changed.  If I'm creating a new 
> > > > > > > record, this doesnt work.
> > > > > > > 
> > > > > > > Within the "Couple_Index" table there is a field called "ProtocolIndexID" 
> > > > > > > which is a foreign key within this table.  The same field is in the 
> > > > > > > "Protocol_Index" table as a primary key.  Like I said above, when the data is 
> > > > > > > all there, meaning I have to manually input this in the field 
> > > > > > > "ProtocolIndexID" within the "Couple_Index" table.  Is there a way that when 
> > > > > > > the user first inputs a new protocol number from the "Protocol_Index" form, 
> > > > > > > that it automatically updates the "ProtocolIndexID" field in the 
> > > > > > > "Couple_Index" table?
> > > > > >
> > > > do it.
> >

0
Utf
1/17/2008 5:44:01 PM
Reply:

Similar Artilces:

Fields in TransactionEntry table
I hope someone can help me understand the contents of three fields in the TransactionEntry table in RMS. I'm trying to see if I can use data stored in these fields to correct the Price in my Item table. Two of the fields are the FullPrice and Price. It appears to me that the Price field is the price charged at the register, the FullPrice is something like the Price in Item. The PriceSource field seems to be a code that is 1 if the regular price is charged, 10 if the price is changed by the cashier and other values depending on the size of the discount applied at the register. My h...

Can't see 401(k) contribiltion total
I've set up a 401(k)accont. I transfer contribiltions to this 401(k)account from each paycheck. When I go to the 401 (k) account view, it shows all the informations such as transections and the account vallue ect., EXCEPT the total contribiltion. I want to know not only what my 401(k) vallue is, but how much money I have contribilt total or over a period of time as well. I find no place to see it. Anybody can help? I'm using Money2002 and 2004 Trial Verstion. Thanks a lot! ...

How can I print a selection in Outlook 2003?
How can I print just a selection of an email in Outlook 2003? The printer driver window is different from the one that comes up in Outlook Express. Thank you! You can do this for HTML formatted messages. Highlight your text, File-> Print... and select to print only the selection -- Robert Sparnaaij [MVP-Outlook] www.howto-outlook.com Tips of the month: -What do the Outlook Icons Mean? -Create an Office 2003 CD slipstreamed with Service Pack 1 ----- "Murphie" <Murphie@discussions.microsoft.com> wrote in message news:92F39B50-B877-408A-AAA7-DF350B1D72ED@microsoft.com....

How to tell if a form is open
I want to know how to return a value telling me whether or not a form is currently open. Something like this pseudo-code: If Forms![new appointment].Open = True Then 'send harry a box of chocolates' End If Cheers -- Nick Assuming Access 2000 or later: If CurrentProject.AllForms("new appointment").IsLoaded Then -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Nick Heath" <NickHeath@discussions.microsoft.com> wrote in messa...

error: OBE-15502 Can only have 16000 per document
Hi, I tried to export data from oracle query builder to Excel sheet, got a error message: OBE-15502 Can only have 16000 per document Is there any way i can get more records(over 16000 or unlimited) in one sheet? thanks. -- JJ ...

Online prices updating quit
It is no longer available as a choice... only manual updating of prices is now available. Anyone know how to get it back? I already removed and reinstalled program (2004 Deluxe). Could it be corrupted .mny file? In microsoft.public.money, david_b2 wrote: >It is no longer available as a choice... only manual updating of prices is >now available. Anyone know how to get it back? I already removed and >reinstalled program (2004 Deluxe). Could it be corrupted .mny file? Help->About->OnlineServicesPolicy and Help->About->LicenseAgreement (section 2. DESCRIPTION OF ...

Can different editions of Publisher be used together?
If my son uses Publisher 2003 on a school computer, downloads his work to a flash drive, brings it home to edit on Publisher 2007, will he then be able to take the edited work back to the school computer to be used, or will it not be compatible? Stateparent wrote: > If my son uses Publisher 2003 on a school computer, downloads his work to a > flash drive, brings it home to edit on Publisher 2007, will he then be able > to take the edited work back to the school computer to be used, or will it > not be compatible? Publisher 2003 and 2007 share a common file format, so the sc...

Can't send/receive
anyone have a situation where all of sudden they can't send new messages or receive anything? I get a message when I click on "accounts" that says 'fatal error in outlook unable to complete operation" ...

Make table truncates text concatenated using fnConcatenate
I have a MakeTable query which uses the fnConcatenate( ) function to merge a bunch of information into a single field. Unfortunately, the field length exceeds 255 characters and the MakeTable tries to dump this into a text field, rather than identifying that the field should be a memo field. I know I could create the base table and import the data from my query into that table, but I would prefer to make this table on the fly, and then delete it when I am done with it. Any recommendations? -- Email address is not valid. Please reply to newsgroup only. On Wed, 11 Apr 2007 12:48:04 -07...

Sending/exporting Outlook Contacts for use in another computer
I want to send the Outlook Contacts address book from my desktop to use in my laptop. Can it be as simple as copying the whole address book file and replacing the laptop Contacts address book with the new one? Thanks. Bob There is no separate "address book" file. The file you need is your Personal Folders file (*.pst) It's where all the mail, calendar, contacts etc are stored. Take a look at these pages for info on Outlook data backup or transfer: http://www.slipstick.com/config/backup.htm http://www.howto-outlook.com/Howto/backupandrestore.htm http://office.microsoft.com...

Can not Customize Leads View
Hi I have tried to customize the Leads view, I tried to add a view and add some columns to it. The view is shown however I see only the name column. When I go back to the View customization, I see the columns I added. Published your customizations??? -- ---------------------- regards, Ilya Milshtein MBS Master, MBSCP, MCP Softline International www.softline.ru "alsap" wrote: > Hi I have tried to customize the Leads view, I tried to add a view and add > some columns to it. > The view is shown however I see only the name column. > When I go back to the View customi...

Money 2006 not updating properly
My bank, Bank One, was purchased by Chase, and until recently maintained a separate identity. My Money 2006 listed all my accounts with Bank One, and updated my records regularly. Now Bank One has merged completely, and all accounts are Chase accounts. Money has created a new Chase account which lists only transactions since Bank One was converted to Chase, and I need to merge everything into one account. How do I do that? Thanks, Terry Hi Terry, Very simple process. 1. click on the account list, then click on manage online services on the left under common tasks. 2. click on ban...

Can I change the "Applied Task Update Requests and Errors" view?
I really like this view in PWA 2007, but I would like to replace one column with another. Is this view customizeable? Randy -- Bad news, my friend. This view is not customizable, nor is the view shown in the Task Updates customizable (which many users wish it was). Hope this help. -- Dale A. Howard [MVP] VP of Educational Services msProjectExperts http://www.msprojectexperts.com http://www.projectserverexperts.com "We write the books on Project Server" "Randy Schmid" <RandySchmid@discussions.microsoft.com> wrote in message news:72FA34B5-...

repetitive windows update
Despite my Outlook 2007 is correctly installed and working, from several days I am receiving KB980376 security update, that is unable to install as "unable to find the related product". Any idea on how to stop this bothering routine ? I tryed to install manually with Windows XP Pro safe install : no result! Thanks Manlio ...

Should be an easy but I can not figure it out!!
I have a text box where the user enters a date and it is assigned to variable txtDate. How to I convert that to the serial number of the date? Thanks for the help IIRC, you can use DATEVAL(String) to get the serial date. -- HTH, Barb Reinhardt "VinceW" wrote: > I have a text box where the user enters a date and it is assigned to variable > txtDate. How to I convert that to the serial number of the date? > > Thanks for the help Barb, Thanks for the quick reply, however I get the error "Sub or Function not defined" when trying...

Bulk attachments
I have a very long list of Images in a single folder that I want to attach to seperate fields in a table/form. Each record contains two images, which are named like this: W:\Foldername\Micromap Run 001 A.bmp =(1st record) W:\Foldername\Micromap Run 001 B.bmp =(1st record) W:\Foldername\Micromap Run 002 A.bmp =(2nd record) W:\Foldername\Micromap Run 002 B.bmp =(2nd record) W:\Foldername\Micromap Run 003 A.bmp =(3rd record) W:\Foldername\Micromap Run 003 B.bmp =(3rd record) and so on... Image A goes to field A Image B goes to field B Is there a way of doing this au...

Hide label and field if blank
How do I hide the label and field if field is blank? Thanks in advance. Are you working in MS Access? Are you working on a form or a report? Which version of Access? More info, please Jeff Boyce Microsoft Office/Access MVP "jhicsupt" <jhicsupt@discussions.microsoft.com> wrote in message news:4AF5FB29-9B63-43DB-BD82-547467F75F54@microsoft.com... > How do I hide the label and field if field is blank? > > Thanks in advance. I found this thread and need the same answer: I am working in MS Access 2003. I want to print a report from a table that has a list of ...

HR Benefit Table
I'm trying to do some cleanup of our benefits (delete benefits that were enrolled and never used) and in the process of querying table BE010130 there are a ton of benefits that have a 0 in the BENEFITSTATUS_I field. When I try to pull them up in GP they don't show under the specified employee. Can anyone tell me what these are and if I can delete them? ------=_NextPart_0001_079D83ED Content-Type: text/plain Content-Transfer-Encoding: 7bit Hello, After looking at the HRBEN.DOC from the SDK, it doesn't appear the BE010130 should have a value of 0. The values that should b...

can't uninstall exchange from cluster nodes
hi our client has several exchange clusters, and one of them is being retired. we have removed the exchange resources and the EVS and the server no longer appears in the organization and everything else there seems to be ok. we can't seem to uninstall exchange from either of the nodes. setup will start saying it's loading components then terminates with no error; happens on both nodes. both nodes are exchange 2003 sp1 on windows 2003. i did find the setup log; here is what it says, hope someone can shed some light on this (company info replaced with < >): [19:47:23] *...

Start background thread when a UI button is clicked, and Update UI button from background thread
I was asked these questions during a technical interview: 1) When the user clicks on a button on the form and that invokes a lot of heavy-duty calculations, what would you do? My answer: I would use "BeginInvoke" to start a background worker thread to do the heavy-duty calculations, in order to avoid blocking the main UI thread. Then he asked, "What does 'BeginInvoke' do"? I said it was a .NET pattern to start a background thread from a UI thread. Did I get it right? 2) Why can't you simply update a button on the UI thread from a background ...

Formatting does not follow when copying from one cell to another
I have a cell on sheet 1 that I have added text to with some bolding, coloring of text, etc. On Sheet 2 I have a cell that I have told to copy whatever is in the cell on sheet 1 described above. Why doesn't the formatting copy over too?? A formula returns a result, not any formatting. Pete On Apr 7, 9:55=A0pm, Banker <Ban...@discussions.microsoft.com> wrote: > I have a cell on sheet 1 that I have added text to with some bolding, > coloring of text, etc. On Sheet 2 I have a cell that I have told to copy > whatever is in the cell on sheet 1 described above. =...

Can't delete email #2
I'm am trying to help a friend who is using Outlook Express on W98, I cannot delete any messages from her in box. She has over 500 in there, which may be part of the problem. Any suggestions? Desperate! Mark Mark Ryan <m.ryan@earthlink.com> wrote: > I'm am trying to help a friend who is using Outlook Express > on W98, I cannot delete any messages from her in box. She > has over 500 in there, which may be part of the problem. > Any suggestions? The first suggestion is to ask in an Outlok Express newsgroup. The second suggestion is to delete Deleted Items.dbx and ...

Can Not Reply To Emails
Running Windows 7 Professional with latest version of WLM. I get email messages I can not reply to. The reply button is grayed out. For now I am forwarding them to my WinXP computer and then replying from that computer with OE6. Anybody have any ideas? -- <Bill> Brought to you from Anchorage, Alaska. The most obvious reason for not having an active Reply button is not having a mail account set up. --=20 Gary VanderMolen, Microsoft MVP (Mail) http://mvp.support.microsoft.com/default.aspx/profile/vandermolen "Bill Bradshaw" <bradshaw@gci.net>...

Sychronizing Report and Parameter Form
How can I get a Report to Open a Paramenter form with the same record referenced? I just can't seem to get it. I have tried everything! Can someone please help me with this. Thank you. On Mon, 14 Jan 2008 07:24:03 -0800, TotallyConfused wrote: > How can I get a Report to Open a Paramenter form with the same record > referenced? I just can't seem to get it. I have tried everything! Can > someone please help me with this. Thank you. A Parameter Form is a form into which you enter a query's parameters. The query is used as the report's record source. It nee...

How can I rename a database table?
Hi I am working on a project that uses the MFC CDatabase and CRecordset classes to handle its interfacing with an Access database. It is necessary for the software to rename a table within existing user databases to ensure that they are valid for use with the new version of the software. As a result of my limited database and MFC knowledge I am having difficulty finding a way of renaming the table. I have tried using the following: try { theDataBase.ExecuteSQL( "RENAME oldTableName TO newTableName"); } catch( CDBException* e) { e->m_strError; } However, it results in th...