Hi Tom,
Thanks for your help, I really appreciated. I changed the Invoice to
Long and it worked fine.
Thank You
John Smith
Tom van Stiphout <tom7744@no.spam.cox.net> wrote in message news:<khp1a0tghk9isdn38r7f08c7u2m0r7v9k0@4ax.com>. ..[color=blue]
> On 11 May 2004 04:09:54 -0700,
jnnybgud2000@yahoo.com (John) wrote:
>
> On what line are you getting that error? Perhaps InvoiceID can be >
> 32767, in which case an Integer is not good enough. Change to:
> Dim Invoice as Long
>
> -Tom.
>
>[color=green]
> >Hi All,
> >I get the overflow error message when I clicked in a button, but so
> >far I can't see anything wrong with the code below. Can anybody help?
> >I'm still a newbie with Access. Any help will be appreciated.
> >
> >Private Sub Command63_Click()
> >On Error GoTo Err_Command80_Click
> > Dim stDocName As String
> > Dim stLinkCriteria As String
> > Dim Invoice As Integer
> >
> > Invoice = Me![InvoiceID]
> > If IsNull(DLookup("[invoiceid]", "[Product]", "[invoiceid]=" &
> >Invoice)) Then
> > stDocName = "Product Details"
> > DoCmd.OpenForm stDocName, , , "[InvoiceID]= " & Me![InvoiceID]
> > Forms![Product]![InvoiceID] = Invoice
> > Else
> > stDocName = "Product Details"
> > DoCmd.OpenForm stDocName, , , "[InvoiceID]= " & Me![InvoiceID]
> > End If
> >Exit_Command80_Click:
> > Exit Sub
> >Err_Command80_Click:
> > MsgBox Err.Description
> > Resume Exit_Command80_Click
> >
> >End Sub
> >
> >Thanks
> >John[/color][/color]