Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

What to do?

Discussion in 'Information Technology' started by Tom, Jul 28, 2006.

  1. Tom

    Tom
    Expand Collapse
    Guest

    Hi,

    I have a table:
    tblGrade
    ID
    Vendor
    Product
    Grade

    I have a form to enter data to that table
    GradeFrm

    cboProduct
    cboVendor
    cboGrade

    now I have on after update event that see if that combination of vendor and
    product exist.
    if yes, a message popup "blah blah do you want to modify Grade?" with YesNo
    option.

    I need when the user choose yes that on the form that combination form
    tblGrade will appear and will be modified.
    I dont want a new record to be created, so there 1 combination for each
    vendor and product.

    Thanks for your time and help,

    Tom
     
  2. Arvin Meyer [MVP]

    Arvin Meyer [MVP]
    Expand Collapse
    Guest

    Use a recordset, or DCount to check if there is an existing record. Use a
    unique compound index on the 2 fields to ensure there will be no duplicates.

    Sub CheckForDupe()
    Dim rst as Recordset
    Set rst = Me.RecordsetClone

    'Try to find a matching record
    rst.FindFirst "[KeyField1] = " & Me![KeyField1] & " And [KeyField2] = " &
    Me![KeyField2]

    'Has one been found?
    If Not rst.NoMatch Then
    'If yes then
    Me.Undo
    Me.Bookmark = rst.BookMark
    End If
    End Sub

    Sub KeyField1_AfterUpdate()
    CheckForDupe
    End Sub

    Sub KeyField2_AfterUpdate()
    CheckForDupe
    End Sub
    --
    Arvin Meyer, MCP, MVP
    Microsoft Access
    Free Access downloads
    http://www.datastrat.com
    http://www.mvps.org/access

    "Tom" <partner1973@yahoo.com> wrote in message
    news:OyqzP$7fGHA.3456@TK2MSFTNGP05.phx.gbl...
    > Hi,
    >
    > I have a table:
    > tblGrade
    > ID
    > Vendor
    > Product
    > Grade
    >
    > I have a form to enter data to that table
    > GradeFrm
    >
    > cboProduct
    > cboVendor
    > cboGrade
    >
    > now I have on after update event that see if that combination of vendor

    and
    > product exist.
    > if yes, a message popup "blah blah do you want to modify Grade?" with

    YesNo
    > option.
    >
    > I need when the user choose yes that on the form that combination form
    > tblGrade will appear and will be modified.
    > I dont want a new record to be created, so there 1 combination for each
    > vendor and product.
    >
    > Thanks for your time and help,
    >
    > Tom
    >
    >
     
  3. Tom

    Tom
    Expand Collapse
    Guest

    Hi Arvin,
    Thank you for helping.
    1.I tried to work with that code, it didnt do it (because of me).
    I`m not sure where to put the sub and how to integrate that sub in the
    AfterUpdate event with the message.
    2. I tried to work wth Dcount as well, but I get mistyp error.


    Thanks again,
    Tom


    "Arvin Meyer [MVP]" <a@m.com> wrote in message
    news:u5pOcj%23fGHA.1208@TK2MSFTNGP02.phx.gbl...
    > Use a recordset, or DCount to check if there is an existing record. Use a
    > unique compound index on the 2 fields to ensure there will be no
    > duplicates.
    >
    > Sub CheckForDupe()
    > Dim rst as Recordset
    > Set rst = Me.RecordsetClone
    >
    > 'Try to find a matching record
    > rst.FindFirst "[KeyField1] = " & Me![KeyField1] & " And [KeyField2] = " &
    > Me![KeyField2]
    >
    > 'Has one been found?
    > If Not rst.NoMatch Then
    > 'If yes then
    > Me.Undo
    > Me.Bookmark = rst.BookMark
    > End If
    > End Sub
    >
    > Sub KeyField1_AfterUpdate()
    > CheckForDupe
    > End Sub
    >
    > Sub KeyField2_AfterUpdate()
    > CheckForDupe
    > End Sub
    > --
    > Arvin Meyer, MCP, MVP
    > Microsoft Access
    > Free Access downloads
    > http://www.datastrat.com
    > http://www.mvps.org/access
    >
    > "Tom" <partner1973@yahoo.com> wrote in message
    > news:OyqzP$7fGHA.3456@TK2MSFTNGP05.phx.gbl...
    >> Hi,
    >>
    >> I have a table:
    >> tblGrade
    >> ID
    >> Vendor
    >> Product
    >> Grade
    >>
    >> I have a form to enter data to that table
    >> GradeFrm
    >>
    >> cboProduct
    >> cboVendor
    >> cboGrade
    >>
    >> now I have on after update event that see if that combination of vendor

    > and
    >> product exist.
    >> if yes, a message popup "blah blah do you want to modify Grade?" with

    > YesNo
    >> option.
    >>
    >> I need when the user choose yes that on the form that combination form
    >> tblGrade will appear and will be modified.
    >> I dont want a new record to be created, so there 1 combination for each
    >> vendor and product.
    >>
    >> Thanks for your time and help,
    >>
    >> Tom
    >>
    >>

    >
    >
     
  4. Tom

    Tom
    Expand Collapse
    Guest

    Can I do something like that:

    If there is a duplicate and the user choose to modify the record then the
    form will be open with that record.

    Maybe use to Dlookup: 1 to look for duplicate and second to open the form
    with the record by Id.

    In case this is a good idea, how do I implement it?

    Thanks,
    Tom


    "Tom" <partner1973@yahoo.com> wrote in message
    news:%23AvhnmAgGHA.2456@TK2MSFTNGP04.phx.gbl...
    > Hi Arvin,
    > Thank you for helping.
    > 1.I tried to work with that code, it didnt do it (because of me).
    > I`m not sure where to put the sub and how to integrate that sub in the
    > AfterUpdate event with the message.
    > 2. I tried to work wth Dcount as well, but I get mistyp error.
    >
    >
    > Thanks again,
    > Tom
    >
    >
    > "Arvin Meyer [MVP]" <a@m.com> wrote in message
    > news:u5pOcj%23fGHA.1208@TK2MSFTNGP02.phx.gbl...
    >> Use a recordset, or DCount to check if there is an existing record. Use a
    >> unique compound index on the 2 fields to ensure there will be no
    >> duplicates.
    >>
    >> Sub CheckForDupe()
    >> Dim rst as Recordset
    >> Set rst = Me.RecordsetClone
    >>
    >> 'Try to find a matching record
    >> rst.FindFirst "[KeyField1] = " & Me![KeyField1] & " And [KeyField2] = " &
    >> Me![KeyField2]
    >>
    >> 'Has one been found?
    >> If Not rst.NoMatch Then
    >> 'If yes then
    >> Me.Undo
    >> Me.Bookmark = rst.BookMark
    >> End If
    >> End Sub
    >>
    >> Sub KeyField1_AfterUpdate()
    >> CheckForDupe
    >> End Sub
    >>
    >> Sub KeyField2_AfterUpdate()
    >> CheckForDupe
    >> End Sub
    >> --
    >> Arvin Meyer, MCP, MVP
    >> Microsoft Access
    >> Free Access downloads
    >> http://www.datastrat.com
    >> http://www.mvps.org/access
    >>
    >> "Tom" <partner1973@yahoo.com> wrote in message
    >> news:OyqzP$7fGHA.3456@TK2MSFTNGP05.phx.gbl...
    >>> Hi,
    >>>
    >>> I have a table:
    >>> tblGrade
    >>> ID
    >>> Vendor
    >>> Product
    >>> Grade
    >>>
    >>> I have a form to enter data to that table
    >>> GradeFrm
    >>>
    >>> cboProduct
    >>> cboVendor
    >>> cboGrade
    >>>
    >>> now I have on after update event that see if that combination of vendor

    >> and
    >>> product exist.
    >>> if yes, a message popup "blah blah do you want to modify Grade?" with

    >> YesNo
    >>> option.
    >>>
    >>> I need when the user choose yes that on the form that combination form
    >>> tblGrade will appear and will be modified.
    >>> I dont want a new record to be created, so there 1 combination for each
    >>> vendor and product.
    >>>
    >>> Thanks for your time and help,
    >>>
    >>> Tom
    >>>
    >>>

    >>
    >>

    >
    >
     
  5. Tom

    Tom
    Expand Collapse
    Guest

    This event got me all confused and frustrated.

    I would like to restart from the beginning.


    I have a table "tblGrades": Index, Product, Vendor, Grade.
    I have a form "GradeFrm" with 3 ComboBox: Product, Vendor, Grade (In that
    order).

    the goal is: in the table each record is unique, one combination of vendor,
    product and grade.
    When a user fill the form, after the vendor was chosen and before updating
    the grade I want the system to check for that combination.
    if it exist then a message pop-up saying that, and ask the user if he want
    to change grade for that combination.
    If he choose yes, that specific record will show and the user will be able
    to choose a different grade.

    Thank you for reading this and for the help,
    Tom






    "Tom" <partner1973@yahoo.com> wrote in message
    news:Oh2pDyAgGHA.5092@TK2MSFTNGP04.phx.gbl...
    > Can I do something like that:
    >
    > If there is a duplicate and the user choose to modify the record then the
    > form will be open with that record.
    >
    > Maybe use to Dlookup: 1 to look for duplicate and second to open the form
    > with the record by Id.
    >
    > In case this is a good idea, how do I implement it?
    >
    > Thanks,
    > Tom
    >
    >
    > "Tom" <partner1973@yahoo.com> wrote in message
    > news:%23AvhnmAgGHA.2456@TK2MSFTNGP04.phx.gbl...
    >> Hi Arvin,
    >> Thank you for helping.
    >> 1.I tried to work with that code, it didnt do it (because of me).
    >> I`m not sure where to put the sub and how to integrate that sub in the
    >> AfterUpdate event with the message.
    >> 2. I tried to work wth Dcount as well, but I get mistyp error.
    >>
    >>
    >> Thanks again,
    >> Tom
    >>
    >>
    >> "Arvin Meyer [MVP]" <a@m.com> wrote in message
    >> news:u5pOcj%23fGHA.1208@TK2MSFTNGP02.phx.gbl...
    >>> Use a recordset, or DCount to check if there is an existing record. Use
    >>> a
    >>> unique compound index on the 2 fields to ensure there will be no
    >>> duplicates.
    >>>
    >>> Sub CheckForDupe()
    >>> Dim rst as Recordset
    >>> Set rst = Me.RecordsetClone
    >>>
    >>> 'Try to find a matching record
    >>> rst.FindFirst "[KeyField1] = " & Me![KeyField1] & " And [KeyField2] = "
    >>> &
    >>> Me![KeyField2]
    >>>
    >>> 'Has one been found?
    >>> If Not rst.NoMatch Then
    >>> 'If yes then
    >>> Me.Undo
    >>> Me.Bookmark = rst.BookMark
    >>> End If
    >>> End Sub
    >>>
    >>> Sub KeyField1_AfterUpdate()
    >>> CheckForDupe
    >>> End Sub
    >>>
    >>> Sub KeyField2_AfterUpdate()
    >>> CheckForDupe
    >>> End Sub
    >>> --
    >>> Arvin Meyer, MCP, MVP
    >>> Microsoft Access
    >>> Free Access downloads
    >>> http://www.datastrat.com
    >>> http://www.mvps.org/access
    >>>
    >>> "Tom" <partner1973@yahoo.com> wrote in message
    >>> news:OyqzP$7fGHA.3456@TK2MSFTNGP05.phx.gbl...
    >>>> Hi,
    >>>>
    >>>> I have a table:
    >>>> tblGrade
    >>>> ID
    >>>> Vendor
    >>>> Product
    >>>> Grade
    >>>>
    >>>> I have a form to enter data to that table
    >>>> >>>>
    >>>> cboProduct
    >>>> cboVendor
    >>>> cboGrade
    >>>>
    >>>> now I have on after update event that see if that combination of vendor
    >>> and
    >>>> product exist.
    >>>> if yes, a message popup "blah blah do you want to modify Grade?" with
    >>> YesNo
    >>>> option.
    >>>>
    >>>> I need when the user choose yes that on the form that combination form
    >>>> tblGrade will appear and will be modified.
    >>>> I dont want a new record to be created, so there 1 combination for each
    >>>> vendor and product.
    >>>>
    >>>> Thanks for your time and help,
    >>>>
    >>>> Tom
    >>>>
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
     
  6. Arvin Meyer [MVP]

    Arvin Meyer [MVP]
    Expand Collapse
    Guest

    OK Tom, I'll do the code with your control names. First, put the first sub
    (CheckForDupe) in the form's code window without regard to a control. It
    should then show up as General and the sub's name. Also make sure the
    FindFirst code is all on one line. I am assuming that the combos are really
    lookups for ProductID and VendorID and the bound field is the long integer:

    Sub CheckForDupe()
    Dim rst as Recordset
    Set rst = Me.RecordsetClone

    ' Try to find a matching record
    ' Next line is all on 1 line
    rst.FindFirst "[ProductID] = " & Me![cboProduct] & " And [VendorID] = " &
    Me![cboVendor]

    ' Has a record been found?
    If Not rst.NoMatch Then
    ' If yes then
    Me.Undo
    Me.Bookmark = rst.BookMark
    End If
    End Sub

    ' AfterUpdate code for Product
    Sub cboProduct_AfterUpdate()
    CheckForDupe
    End Sub

    ' AfterUpdate code for Vendor
    Sub cboVendor_AfterUpdate()
    CheckForDupe
    End Sub
    --
    Arvin Meyer, MCP, MVP
    Microsoft Access
    Free Access downloads
    http://www.datastrat.com
    http://www.mvps.org/access


    "Tom" <partner1973@yahoo.com> wrote in message
    news:eToBCkBgGHA.2456@TK2MSFTNGP04.phx.gbl...
    > This event got me all confused and frustrated.
    >
    > I would like to restart from the beginning.
    >
    >
    > I have a table "tblGrades": Index, Product, Vendor, Grade.
    > I have a form "GradeFrm" with 3 ComboBox: Product, Vendor, Grade (In that
    > order).
    >
    > the goal is: in the table each record is unique, one combination of

    vendor,
    > product and grade.
    > When a user fill the form, after the vendor was chosen and before updating
    > the grade I want the system to check for that combination.
    > if it exist then a message pop-up saying that, and ask the user if he want
    > to change grade for that combination.
    > If he choose yes, that specific record will show and the user will be able
    > to choose a different grade.
    >
    > Thank you for reading this and for the help,
    > Tom
    >
    >
    >
    >
    >
    >
    > "Tom" <partner1973@yahoo.com> wrote in message
    > news:Oh2pDyAgGHA.5092@TK2MSFTNGP04.phx.gbl...
    > > Can I do something like that:
    > >
    > > If there is a duplicate and the user choose to modify the record then

    the
    > > form will be open with that record.
    > >
    > > Maybe use to Dlookup: 1 to look for duplicate and second to open the

    form
    > > with the record by Id.
    > >
    > > In case this is a good idea, how do I implement it?
    > >
    > > Thanks,
    > > Tom
    > >
    > >
    > > "Tom" <partner1973@yahoo.com> wrote in message
    > > news:%23AvhnmAgGHA.2456@TK2MSFTNGP04.phx.gbl...
    > >> Hi Arvin,
    > >> Thank you for helping.
    > >> 1.I tried to work with that code, it didnt do it (because of me).
    > >> I`m not sure where to put the sub and how to integrate that sub in

    the
    > >> AfterUpdate event with the message.
    > >> 2. I tried to work wth Dcount as well, but I get mistyp error.
    > >>
    > >>
    > >> Thanks again,
    > >> Tom
    > >>
    > >>
    > >> "Arvin Meyer [MVP]" <a@m.com> wrote in message
    > >> news:u5pOcj%23fGHA.1208@TK2MSFTNGP02.phx.gbl...
    > >>> Use a recordset, or DCount to check if there is an existing record.

    Use
    > >>> a
    > >>> unique compound index on the 2 fields to ensure there will be no
    > >>> duplicates.
    > >>>
    > >>> Sub CheckForDupe()
    > >>> Dim rst as Recordset
    > >>> Set rst = Me.RecordsetClone
    > >>>
    > >>> 'Try to find a matching record
    > >>> rst.FindFirst "[KeyField1] = " & Me![KeyField1] & " And [KeyField2] =

    "
    > >>> &
    > >>> Me![KeyField2]
    > >>>
    > >>> 'Has one been found?
    > >>> If Not rst.NoMatch Then
    > >>> 'If yes then
    > >>> Me.Undo
    > >>> Me.Bookmark = rst.BookMark
    > >>> End If
    > >>> End Sub
    > >>>
    > >>> Sub KeyField1_AfterUpdate()
    > >>> CheckForDupe
    > >>> End Sub
    > >>>
    > >>> Sub KeyField2_AfterUpdate()
    > >>> CheckForDupe
    > >>> End Sub
    > >>> --
    > >>> Arvin Meyer, MCP, MVP
    > >>> Microsoft Access
    > >>> Free Access downloads
    > >>> http://www.datastrat.com
    > >>> http://www.mvps.org/access
    > >>>
    > >>> "Tom" <partner1973@yahoo.com> wrote in message
    > >>> news:OyqzP$7fGHA.3456@TK2MSFTNGP05.phx.gbl...
    > >>>> Hi,
    > >>>>
    > >>>> I have a table:
    > >>>> tblGrade
    > >>>> ID
    > >>>> Vendor
    > >>>> Product
    > >>>> Grade
    > >>>>
    > >>>> I have a form to enter data to that table
    > >>>> >>>>
    > >>>> cboProduct
    > >>>> cboVendor
    > >>>> cboGrade
    > >>>>
    > >>>> now I have on after update event that see if that combination of

    vendor
    > >>> and
    > >>>> product exist.
    > >>>> if yes, a message popup "blah blah do you want to modify Grade?" with
    > >>> YesNo
    > >>>> option.
    > >>>>
    > >>>> I need when the user choose yes that on the form that combination

    form
    > >>>> tblGrade will appear and will be modified.
    > >>>> I dont want a new record to be created, so there 1 combination for

    each
    > >>>> vendor and product.
    > >>>>
    > >>>> Thanks for your time and help,
    > >>>>
    > >>>> Tom
    > >>>>
    > >>>>
    > >>>
    > >>>
    > >>
    > >>

    > >
    > >

    >
    >
     
  7. Tom

    Tom
    Expand Collapse
    Guest

    Thanks Arvin for your time and patience.
    I followed your directions strictly, but I got this:

    run time error 3070:
    The Microsoft jet database engine does not recognize 'ProductID' as a valid
    field name or expression.

    Please help, thanks
    Tom




    "Arvin Meyer [MVP]" <a@m.com> wrote in message
    news:e0flsUGgGHA.4864@TK2MSFTNGP05.phx.gbl...
    > OK Tom, I'll do the code with your control names. First, put the first sub
    > (CheckForDupe) in the form's code window without regard to a control. It
    > should then show up as General and the sub's name. Also make sure the
    > FindFirst code is all on one line. I am assuming that the combos are
    > really
    > lookups for ProductID and VendorID and the bound field is the long
    > integer:
    >
    > Sub CheckForDupe()
    > Dim rst as Recordset
    > Set rst = Me.RecordsetClone
    >
    > ' Try to find a matching record
    > ' Next line is all on 1 line
    > rst.FindFirst "[ProductID] = " & Me![cboProduct] & " And [VendorID] = " &
    > Me![cboVendor]
    >
    > ' Has a record been found?
    > If Not rst.NoMatch Then
    > ' If yes then
    > Me.Undo
    > Me.Bookmark = rst.BookMark
    > End If
    > End Sub
    >
    > ' AfterUpdate code for Product
    > Sub cboProduct_AfterUpdate()
    > CheckForDupe
    > End Sub
    >
    > ' AfterUpdate code for Vendor
    > Sub cboVendor_AfterUpdate()
    > CheckForDupe
    > End Sub
    > --
    > Arvin Meyer, MCP, MVP
    > Microsoft Access
    > Free Access downloads
    > http://www.datastrat.com
    > http://www.mvps.org/access
    >
    >
    > "Tom" <partner1973@yahoo.com> wrote in message
    > news:eToBCkBgGHA.2456@TK2MSFTNGP04.phx.gbl...
    >> This event got me all confused and frustrated.
    >>
    >> I would like to restart from the beginning.
    >>
    >>
    >> I have a table "tblGrades": Index, Product, Vendor, Grade.
    >> I have a form "GradeFrm" with 3 ComboBox: Product, Vendor, Grade (In that
    >> order).
    >>
    >> the goal is: in the table each record is unique, one combination of

    > vendor,
    >> product and grade.
    >> When a user fill the form, after the vendor was chosen and before
    >> updating
    >> the grade I want the system to check for that combination.
    >> if it exist then a message pop-up saying that, and ask the user if he
    >> want
    >> to change grade for that combination.
    >> If he choose yes, that specific record will show and the user will be
    >> able
    >> to choose a different grade.
    >>
    >> Thank you for reading this and for the help,
    >> Tom
    >>
    >>
    >>
    >>
    >>
    >>
    >> "Tom" <partner1973@yahoo.com> wrote in message
    >> news:Oh2pDyAgGHA.5092@TK2MSFTNGP04.phx.gbl...
    >> > Can I do something like that:
    >> >
    >> > If there is a duplicate and the user choose to modify the record then

    > the
    >> > form will be open with that record.
    >> >
    >> > Maybe use to Dlookup: 1 to look for duplicate and second to open the

    > form
    >> > with the record by Id.
    >> >
    >> > In case this is a good idea, how do I implement it?
    >> >
    >> > Thanks,
    >> > Tom
    >> >
    >> >
    >> > "Tom" <partner1973@yahoo.com> wrote in message
    >> > news:%23AvhnmAgGHA.2456@TK2MSFTNGP04.phx.gbl...
    >> >> Hi Arvin,
    >> >> Thank you for helping.
    >> >> 1.I tried to work with that code, it didnt do it (because of me).
    >> >> I`m not sure where to put the sub and how to integrate that sub in

    > the
    >> >> AfterUpdate event with the message.
    >> >> 2. I tried to work wth Dcount as well, but I get mistyp error.
    >> >>
    >> >>
    >> >> Thanks again,
    >> >> Tom
    >> >>
    >> >>
    >> >> "Arvin Meyer [MVP]" <a@m.com> wrote in message
    >> >> news:u5pOcj%23fGHA.1208@TK2MSFTNGP02.phx.gbl...
    >> >>> Use a recordset, or DCount to check if there is an existing record.

    > Use
    >> >>> a
    >> >>> unique compound index on the 2 fields to ensure there will be no
    >> >>> duplicates.
    >> >>>
    >> >>> Sub CheckForDupe()
    >> >>> Dim rst as Recordset
    >> >>> Set rst = Me.RecordsetClone
    >> >>>
    >> >>> 'Try to find a matching record
    >> >>> rst.FindFirst "[KeyField1] = " & Me![KeyField1] & " And [KeyField2] =

    > "
    >> >>> &
    >> >>> Me![KeyField2]
    >> >>>
    >> >>> 'Has one been found?
    >> >>> If Not rst.NoMatch Then
    >> >>> 'If yes then
    >> >>> Me.Undo
    >> >>> Me.Bookmark = rst.BookMark
    >> >>> End If
    >> >>> End Sub
    >> >>>
    >> >>> Sub KeyField1_AfterUpdate()
    >> >>> CheckForDupe
    >> >>> End Sub
    >> >>>
    >> >>> Sub KeyField2_AfterUpdate()
    >> >>> CheckForDupe
    >> >>> End Sub
    >> >>> --
    >> >>> Arvin Meyer, MCP, MVP
    >> >>> Microsoft Access
    >> >>> Free Access downloads
    >> >>> http://www.datastrat.com
    >> >>> http://www.mvps.org/access
    >> >>>
    >> >>> "Tom" <partner1973@yahoo.com> wrote in message
    >> >>> news:OyqzP$7fGHA.3456@TK2MSFTNGP05.phx.gbl...
    >> >>>> Hi,
    >> >>>>
    >> >>>> I have a table:
    >> >>>> tblGrade
    >> >>>> ID
    >> >>>> Vendor
    >> >>>> Product
    >> >>>> Grade
    >> >>>>
    >> >>>> I have a form to enter data to that table
    >> >>>> >>>>
    >> >>>> cboProduct
    >> >>>> cboVendor
    >> >>>> cboGrade
    >> >>>>
    >> >>>> now I have on after update event that see if that combination of

    > vendor
    >> >>> and
    >> >>>> product exist.
    >> >>>> if yes, a message popup "blah blah do you want to modify Grade?"
    >> >>>> with
    >> >>> YesNo
    >> >>>> option.
    >> >>>>
    >> >>>> I need when the user choose yes that on the form that combination

    > form
    >> >>>> tblGrade will appear and will be modified.
    >> >>>> I dont want a new record to be created, so there 1 combination for

    > each
    >> >>>> vendor and product.
    >> >>>>
    >> >>>> Thanks for your time and help,
    >> >>>>
    >> >>>> Tom
    >> >>>>
    >> >>>>
    >> >>>
    >> >>>
    >> >>
    >> >>
    >> >
    >> >

    >>
    >>

    >
    >
     
  8. Arvin Meyer [MVP]

    Arvin Meyer [MVP]
    Expand Collapse
    Guest

    Are you using lookup fields? By that I mean do you have combo boxes in the
    tables themselves?

    http://www.mvps.org/access/lookupfields.htm
    --
    Arvin Meyer, MCP, MVP
    Microsoft Access
    Free Access downloads
    http://www.datastrat.com
    http://www.mvps.org/access


    "Tom" <partner1973@yahoo.com> wrote in message
    news:#fyl6DIgGHA.4080@TK2MSFTNGP03.phx.gbl...
    > Thanks Arvin for your time and patience.
    > I followed your directions strictly, but I got this:
    >
    > run time error 3070:
    > The Microsoft jet database engine does not recognize 'ProductID' as a

    valid
    > field name or expression.
    >
    > Please help, thanks
    > Tom
    >
    >
    >
    >
    > "Arvin Meyer [MVP]" <a@m.com> wrote in message
    > news:e0flsUGgGHA.4864@TK2MSFTNGP05.phx.gbl...
    > > OK Tom, I'll do the code with your control names. First, put the first

    sub
    > > (CheckForDupe) in the form's code window without regard to a control. It
    > > should then show up as General and the sub's name. Also make sure the
    > > FindFirst code is all on one line. I am assuming that the combos are
    > > really
    > > lookups for ProductID and VendorID and the bound field is the long
    > > integer:
    > >
    > > Sub CheckForDupe()
    > > Dim rst as Recordset
    > > Set rst = Me.RecordsetClone
    > >
    > > ' Try to find a matching record
    > > ' Next line is all on 1 line
    > > rst.FindFirst "[ProductID] = " & Me![cboProduct] & " And [VendorID] = "

    &
    > > Me![cboVendor]
    > >
    > > ' Has a record been found?
    > > If Not rst.NoMatch Then
    > > ' If yes then
    > > Me.Undo
    > > Me.Bookmark = rst.BookMark
    > > End If
    > > End Sub
    > >
    > > ' AfterUpdate code for Product
    > > Sub cboProduct_AfterUpdate()
    > > CheckForDupe
    > > End Sub
    > >
    > > ' AfterUpdate code for Vendor
    > > Sub cboVendor_AfterUpdate()
    > > CheckForDupe
    > > End Sub
    > > --
    > > Arvin Meyer, MCP, MVP
    > > Microsoft Access
    > > Free Access downloads
    > > http://www.datastrat.com
    > > http://www.mvps.org/access
    > >
    > >
    > > "Tom" <partner1973@yahoo.com> wrote in message
    > > news:eToBCkBgGHA.2456@TK2MSFTNGP04.phx.gbl...
    > >> This event got me all confused and frustrated.
    > >>
    > >> I would like to restart from the beginning.
    > >>
    > >>
    > >> I have a table "tblGrades": Index, Product, Vendor, Grade.
    > >> I have a form "GradeFrm" with 3 ComboBox: Product, Vendor, Grade (In

    that
    > >> order).
    > >>
    > >> the goal is: in the table each record is unique, one combination of

    > > vendor,
    > >> product and grade.
    > >> When a user fill the form, after the vendor was chosen and before
    > >> updating
    > >> the grade I want the system to check for that combination.
    > >> if it exist then a message pop-up saying that, and ask the user if he
    > >> want
    > >> to change grade for that combination.
    > >> If he choose yes, that specific record will show and the user will be
    > >> able
    > >> to choose a different grade.
    > >>
    > >> Thank you for reading this and for the help,
    > >> Tom
    > >>
    > >>
    > >>
    > >>
    > >>
    > >>
    > >> "Tom" <partner1973@yahoo.com> wrote in message
    > >> news:Oh2pDyAgGHA.5092@TK2MSFTNGP04.phx.gbl...
    > >> > Can I do something like that:
    > >> >
    > >> > If there is a duplicate and the user choose to modify the record then

    > > the
    > >> > form will be open with that record.
    > >> >
    > >> > Maybe use to Dlookup: 1 to look for duplicate and second to open the

    > > form
    > >> > with the record by Id.
    > >> >
    > >> > In case this is a good idea, how do I implement it?
    > >> >
    > >> > Thanks,
    > >> > Tom
    > >> >
    > >> >
    > >> > "Tom" <partner1973@yahoo.com> wrote in message
    > >> > news:%23AvhnmAgGHA.2456@TK2MSFTNGP04.phx.gbl...
    > >> >> Hi Arvin,
    > >> >> Thank you for helping.
    > >> >> 1.I tried to work with that code, it didnt do it (because of me).
    > >> >> I`m not sure where to put the sub and how to integrate that sub

    in
    > > the
    > >> >> AfterUpdate event with the message.
    > >> >> 2. I tried to work wth Dcount as well, but I get mistyp error.
    > >> >>
    > >> >>
    > >> >> Thanks again,
    > >> >> Tom
    > >> >>
    > >> >>
    > >> >> "Arvin Meyer [MVP]" <a@m.com> wrote in message
    > >> >> news:u5pOcj%23fGHA.1208@TK2MSFTNGP02.phx.gbl...
    > >> >>> Use a recordset, or DCount to check if there is an existing record.

    > > Use
    > >> >>> a
    > >> >>> unique compound index on the 2 fields to ensure there will be no
    > >> >>> duplicates.
    > >> >>>
    > >> >>> Sub CheckForDupe()
    > >> >>> Dim rst as Recordset
    > >> >>> Set rst = Me.RecordsetClone
    > >> >>>
    > >> >>> 'Try to find a matching record
    > >> >>> rst.FindFirst "[KeyField1] = " & Me![KeyField1] & " And [KeyField2]

    =
    > > "
    > >> >>> &
    > >> >>> Me![KeyField2]
    > >> >>>
    > >> >>> 'Has one been found?
    > >> >>> If Not rst.NoMatch Then
    > >> >>> 'If yes then
    > >> >>> Me.Undo
    > >> >>> Me.Bookmark = rst.BookMark
    > >> >>> End If
    > >> >>> End Sub
    > >> >>>
    > >> >>> Sub KeyField1_AfterUpdate()
    > >> >>> CheckForDupe
    > >> >>> End Sub
    > >> >>>
    > >> >>> Sub KeyField2_AfterUpdate()
    > >> >>> CheckForDupe
    > >> >>> End Sub
    > >> >>> --
    > >> >>> Arvin Meyer, MCP, MVP
    > >> >>> Microsoft Access
    > >> >>> Free Access downloads
    > >> >>> http://www.datastrat.com
    > >> >>> http://www.mvps.org/access
    > >> >>>
    > >> >>> "Tom" <partner1973@yahoo.com> wrote in message
    > >> >>> news:OyqzP$7fGHA.3456@TK2MSFTNGP05.phx.gbl...
    > >> >>>> Hi,
    > >> >>>>
    > >> >>>> I have a table:
    > >> >>>> tblGrade
    > >> >>>> ID
    > >> >>>> Vendor
    > >> >>>> Product
    > >> >>>> Grade
    > >> >>>>
    > >> >>>> I have a form to enter data to that table
    > >> >>>> >>>>
    > >> >>>> cboProduct
    > >> >>>> cboVendor
    > >> >>>> cboGrade
    > >> >>>>
    > >> >>>> now I have on after update event that see if that combination of

    > > vendor
    > >> >>> and
    > >> >>>> product exist.
    > >> >>>> if yes, a message popup "blah blah do you want to modify Grade?"
    > >> >>>> with
    > >> >>> YesNo
    > >> >>>> option.
    > >> >>>>
    > >> >>>> I need when the user choose yes that on the form that combination

    > > form
    > >> >>>> tblGrade will appear and will be modified.
    > >> >>>> I dont want a new record to be created, so there 1 combination for

    > > each
    > >> >>>> vendor and product.
    > >> >>>>
    > >> >>>> Thanks for your time and help,
    > >> >>>>
    > >> >>>> Tom
    > >> >>>>
    > >> >>>>
    > >> >>>
    > >> >>>
    > >> >>
    > >> >>
    > >> >
    > >> >
    > >>
    > >>

    > >
    > >

    >
    >
     
  9. Tom

    Tom
    Expand Collapse
    Guest

    Hi Arvin,
    The fields "Product" and "Vendor" in tblGrades are lookup fields.(I saw the
    article and I`m not sure it`s good).
    for both, data type is Number and field size is Long Integer. the value that
    actually you see in the table is text.

    Thanks,
    Tom
    "Arvin Meyer [MVP]" <a@m.com> wrote in message
    news:%23lko2TLgGHA.3916@TK2MSFTNGP04.phx.gbl...
    > Are you using lookup fields? By that I mean do you have combo boxes in the
    > tables themselves?
    >
    > http://www.mvps.org/access/lookupfields.htm
    > --
    > Arvin Meyer, MCP, MVP
    > Microsoft Access
    > Free Access downloads
    > http://www.datastrat.com
    > http://www.mvps.org/access
    >
    >
    > "Tom" <partner1973@yahoo.com> wrote in message
    > news:#fyl6DIgGHA.4080@TK2MSFTNGP03.phx.gbl...
    >> Thanks Arvin for your time and patience.
    >> I followed your directions strictly, but I got this:
    >>
    >> run time error 3070:
    >> The Microsoft jet database engine does not recognize 'ProductID' as a

    > valid
    >> field name or expression.
    >>
    >> Please help, thanks
    >> Tom
    >>
    >>
    >>
    >>
    >> "Arvin Meyer [MVP]" <a@m.com> wrote in message
    >> news:e0flsUGgGHA.4864@TK2MSFTNGP05.phx.gbl...
    >> > OK Tom, I'll do the code with your control names. First, put the first

    > sub
    >> > (CheckForDupe) in the form's code window without regard to a control.
    >> > It
    >> > should then show up as General and the sub's name. Also make sure the
    >> > FindFirst code is all on one line. I am assuming that the combos are
    >> > really
    >> > lookups for ProductID and VendorID and the bound field is the long
    >> > integer:
    >> >
    >> > Sub CheckForDupe()
    >> > Dim rst as Recordset
    >> > Set rst = Me.RecordsetClone
    >> >
    >> > ' Try to find a matching record
    >> > ' Next line is all on 1 line
    >> > rst.FindFirst "[ProductID] = " & Me![cboProduct] & " And [VendorID] = "

    > &
    >> > Me![cboVendor]
    >> >
    >> > ' Has a record been found?
    >> > If Not rst.NoMatch Then
    >> > ' If yes then
    >> > Me.Undo
    >> > Me.Bookmark = rst.BookMark
    >> > End If
    >> > End Sub
    >> >
    >> > ' AfterUpdate code for Product
    >> > Sub cboProduct_AfterUpdate()
    >> > CheckForDupe
    >> > End Sub
    >> >
    >> > ' AfterUpdate code for Vendor
    >> > Sub cboVendor_AfterUpdate()
    >> > CheckForDupe
    >> > End Sub
    >> > --
    >> > Arvin Meyer, MCP, MVP
    >> > Microsoft Access
    >> > Free Access downloads
    >> > http://www.datastrat.com
    >> > http://www.mvps.org/access
    >> >
    >> >
    >> > "Tom" <partner1973@yahoo.com> wrote in message
    >> > news:eToBCkBgGHA.2456@TK2MSFTNGP04.phx.gbl...
    >> >> This event got me all confused and frustrated.
    >> >>
    >> >> I would like to restart from the beginning.
    >> >>
    >> >>
    >> >> I have a table "tblGrades": Index, Product, Vendor, Grade.
    >> >> I have a form "GradeFrm" with 3 ComboBox: Product, Vendor, Grade (In

    > that
    >> >> order).
    >> >>
    >> >> the goal is: in the table each record is unique, one combination of
    >> > vendor,
    >> >> product and grade.
    >> >> When a user fill the form, after the vendor was chosen and before
    >> >> updating
    >> >> the grade I want the system to check for that combination.
    >> >> if it exist then a message pop-up saying that, and ask the user if he
    >> >> want
    >> >> to change grade for that combination.
    >> >> If he choose yes, that specific record will show and the user will be
    >> >> able
    >> >> to choose a different grade.
    >> >>
    >> >> Thank you for reading this and for the help,
    >> >> Tom
    >> >>
    >> >>
    >> >>
    >> >>
    >> >>
    >> >>
    >> >> "Tom" <partner1973@yahoo.com> wrote in message
    >> >> news:Oh2pDyAgGHA.5092@TK2MSFTNGP04.phx.gbl...
    >> >> > Can I do something like that:
    >> >> >
    >> >> > If there is a duplicate and the user choose to modify the record
    >> >> > then
    >> > the
    >> >> > form will be open with that record.
    >> >> >
    >> >> > Maybe use to Dlookup: 1 to look for duplicate and second to open the
    >> > form
    >> >> > with the record by Id.
    >> >> >
    >> >> > In case this is a good idea, how do I implement it?
    >> >> >
    >> >> > Thanks,
    >> >> > Tom
    >> >> >
    >> >> >
    >> >> > "Tom" <partner1973@yahoo.com> wrote in message
    >> >> > news:%23AvhnmAgGHA.2456@TK2MSFTNGP04.phx.gbl...
    >> >> >> Hi Arvin,
    >> >> >> Thank you for helping.
    >> >> >> 1.I tried to work with that code, it didnt do it (because of me).
    >> >> >> I`m not sure where to put the sub and how to integrate that sub

    > in
    >> > the
    >> >> >> AfterUpdate event with the message.
    >> >> >> 2. I tried to work wth Dcount as well, but I get mistyp error.
    >> >> >>
    >> >> >>
    >> >> >> Thanks again,
    >> >> >> Tom
    >> >> >>
    >> >> >>
    >> >> >> "Arvin Meyer [MVP]" <a@m.com> wrote in message
    >> >> >> news:u5pOcj%23fGHA.1208@TK2MSFTNGP02.phx.gbl...
    >> >> >>> Use a recordset, or DCount to check if there is an existing
    >> >> >>> record.
    >> > Use
    >> >> >>> a
    >> >> >>> unique compound index on the 2 fields to ensure there will be no
    >> >> >>> duplicates.
    >> >> >>>
    >> >> >>> Sub CheckForDupe()
    >> >> >>> Dim rst as Recordset
    >> >> >>> Set rst = Me.RecordsetClone
    >> >> >>>
    >> >> >>> 'Try to find a matching record
    >> >> >>> rst.FindFirst "[KeyField1] = " & Me![KeyField1] & " And
    >> >> >>> [KeyField2]

    > =
    >> > "
    >> >> >>> &
    >> >> >>> Me![KeyField2]
    >> >> >>>
    >> >> >>> 'Has one been found?
    >> >> >>> If Not rst.NoMatch Then
    >> >> >>> 'If yes then
    >> >> >>> Me.Undo
    >> >> >>> Me.Bookmark = rst.BookMark
    >> >> >>> End If
    >> >> >>> End Sub
    >> >> >>>
    >> >> >>> Sub KeyField1_AfterUpdate()
    >> >> >>> CheckForDupe
    >> >> >>> End Sub
    >> >> >>>
    >> >> >>> Sub KeyField2_AfterUpdate()
    >> >> >>> CheckForDupe
    >> >> >>> End Sub
    >> >> >>> --
    >> >> >>> Arvin Meyer, MCP, MVP
    >> >> >>> Microsoft Access
    >> >> >>> Free Access downloads
    >> >> >>> http://www.datastrat.com
    >> >> >>> http://www.mvps.org/access
    >> >> >>>
    >> >> >>> "Tom" <partner1973@yahoo.com> wrote in message
    >> >> >>> news:OyqzP$7fGHA.3456@TK2MSFTNGP05.phx.gbl...
    >> >> >>>> Hi,
    >> >> >>>>
    >> >> >>>> I have a table:
    >> >> >>>> tblGrade
    >> >> >>>> ID
    >> >> >>>> Vendor
    >> >> >>>> Product
    >> >> >>>> Grade
    >> >> >>>>
    >> >> >>>> I have a form to enter data to that table
    >> >> >>>> >>>>
    >> >> >>>> cboProduct
    >> >> >>>> cboVendor
    >> >> >>>> cboGrade
    >> >> >>>>
    >> >> >>>> now I have on after update event that see if that combination of
    >> > vendor
    >> >> >>> and
    >> >> >>>> product exist.
    >> >> >>>> if yes, a message popup "blah blah do you want to modify Grade?"
    >> >> >>>> with
    >> >> >>> YesNo
    >> >> >>>> option.
    >> >> >>>>
    >> >> >>>> I need when the user choose yes that on the form that combination
    >> > form
    >> >> >>>> tblGrade will appear and will be modified.
    >> >> >>>> I dont want a new record to be created, so there 1 combination
    >> >> >>>> for
    >> > each
    >> >> >>>> vendor and product.
    >> >> >>>>
    >> >> >>>> Thanks for your time and help,
    >> >> >>>>
    >> >> >>>> Tom
    >> >> >>>>
    >> >> >>>>
    >> >> >>>
    >> >> >>>
    >> >> >>
    >> >> >>
    >> >> >
    >> >> >
    >> >>
    >> >>
    >> >
    >> >

    >>
    >>

    >
    >
     
  10. Tom

    Tom
    Expand Collapse
    Guest

    I tried to change the name of fields in tblGrades:
    Product changed to ProducyID and Vendor was changed to VendorID.
    I ended up with another error message:
    Rum time error 3070:
    Syntax error (missing operator) in expression.

    Thanks,
    Tom
    "Tom" <partner1973@yahoo.com> wrote in message
    news:u8Va%23hMgGHA.1792@TK2MSFTNGP03.phx.gbl...
    > Hi Arvin,
    > The fields "Product" and "Vendor" in tblGrades are lookup fields.(I saw
    > the article and I`m not sure it`s good).
    > for both, data type is Number and field size is Long Integer. the value
    > that actually you see in the table is text.
    >
    > Thanks,
    > Tom
    > "Arvin Meyer [MVP]" <a@m.com> wrote in message
    > news:%23lko2TLgGHA.3916@TK2MSFTNGP04.phx.gbl...
    >> Are you using lookup fields? By that I mean do you have combo boxes in
    >> the
    >> tables themselves?
    >>
    >> http://www.mvps.org/access/lookupfields.htm
    >> --
    >> Arvin Meyer, MCP, MVP
    >> Microsoft Access
    >> Free Access downloads
    >> http://www.datastrat.com
    >> http://www.mvps.org/access
    >>
    >>
    >> "Tom" <partner1973@yahoo.com> wrote in message
    >> news:#fyl6DIgGHA.4080@TK2MSFTNGP03.phx.gbl...
    >>> Thanks Arvin for your time and patience.
    >>> I followed your directions strictly, but I got this:
    >>>
    >>> run time error 3070:
    >>> The Microsoft jet database engine does not recognize 'ProductID' as a

    >> valid
    >>> field name or expression.
    >>>
    >>> Please help, thanks
    >>> Tom
    >>>
    >>>
    >>>
    >>>
    >>> "Arvin Meyer [MVP]" <a@m.com> wrote in message
    >>> news:e0flsUGgGHA.4864@TK2MSFTNGP05.phx.gbl...
    >>> > OK Tom, I'll do the code with your control names. First, put the first

    >> sub
    >>> > (CheckForDupe) in the form's code window without regard to a control.
    >>> > It
    >>> > should then show up as General and the sub's name. Also make sure the
    >>> > FindFirst code is all on one line. I am assuming that the combos are
    >>> > really
    >>> > lookups for ProductID and VendorID and the bound field is the long
    >>> > integer:
    >>> >
    >>> > Sub CheckForDupe()
    >>> > Dim rst as Recordset
    >>> > Set rst = Me.RecordsetClone
    >>> >
    >>> > ' Try to find a matching record
    >>> > ' Next line is all on 1 line
    >>> > rst.FindFirst "[ProductID] = " & Me![cboProduct] & " And [VendorID] =
    >>> > "

    >> &
    >>> > Me![cboVendor]
    >>> >
    >>> > ' Has a record been found?
    >>> > If Not rst.NoMatch Then
    >>> > ' If yes then
    >>> > Me.Undo
    >>> > Me.Bookmark = rst.BookMark
    >>> > End If
    >>> > End Sub
    >>> >
    >>> > ' AfterUpdate code for Product
    >>> > Sub cboProduct_AfterUpdate()
    >>> > CheckForDupe
    >>> > End Sub
    >>> >
    >>> > ' AfterUpdate code for Vendor
    >>> > Sub cboVendor_AfterUpdate()
    >>> > CheckForDupe
    >>> > End Sub
    >>> > --
    >>> > Arvin Meyer, MCP, MVP
    >>> > Microsoft Access
    >>> > Free Access downloads
    >>> > http://www.datastrat.com
    >>> > http://www.mvps.org/access
    >>> >
    >>> >
    >>> > "Tom" <partner1973@yahoo.com> wrote in message
    >>> > news:eToBCkBgGHA.2456@TK2MSFTNGP04.phx.gbl...
    >>> >> This event got me all confused and frustrated.
    >>> >>
    >>> >> I would like to restart from the beginning.
    >>> >>
    >>> >>
    >>> >> I have a table "tblGrades": Index, Product, Vendor, Grade.
    >>> >> I have a form "GradeFrm" with 3 ComboBox: Product, Vendor, Grade (In

    >> that
    >>> >> order).
    >>> >>
    >>> >> the goal is: in the table each record is unique, one combination of
    >>> > vendor,
    >>> >> product and grade.
    >>> >> When a user fill the form, after the vendor was chosen and before
    >>> >> updating
    >>> >> the grade I want the system to check for that combination.
    >>> >> if it exist then a message pop-up saying that, and ask the user if he
    >>> >> want
    >>> >> to change grade for that combination.
    >>> >> If he choose yes, that specific record will show and the user will be
    >>> >> able
    >>> >> to choose a different grade.
    >>> >>
    >>> >> Thank you for reading this and for the help,
    >>> >> Tom
    >>> >>
    >>> >>
    >>> >>
    >>> >>
    >>> >>
    >>> >>
    >>> >> "Tom" <partner1973@yahoo.com> wrote in message
    >>> >> news:Oh2pDyAgGHA.5092@TK2MSFTNGP04.phx.gbl...
    >>> >> > Can I do something like that:
    >>> >> >
    >>> >> > If there is a duplicate and the user choose to modify the record
    >>> >> > then
    >>> > the
    >>> >> > form will be open with that record.
    >>> >> >
    >>> >> > Maybe use to Dlookup: 1 to look for duplicate and second to open
    >>> >> > the
    >>> > form
    >>> >> > with the record by Id.
    >>> >> >
    >>> >> > In case this is a good idea, how do I implement it?
    >>> >> >
    >>> >> > Thanks,
    >>> >> > Tom
    >>> >> >
    >>> >> >
    >>> >> > "Tom" <partner1973@yahoo.com> wrote in message
    >>> >> > news:%23AvhnmAgGHA.2456@TK2MSFTNGP04.phx.gbl...
    >>> >> >> Hi Arvin,
    >>> >> >> Thank you for helping.
    >>> >> >> 1.I tried to work with that code, it didnt do it (because of me).
    >>> >> >> I`m not sure where to put the sub and how to integrate that sub

    >> in
    >>> > the
    >>> >> >> AfterUpdate event with the message.
    >>> >> >> 2. I tried to work wth Dcount as well, but I get mistyp error.
    >>> >> >>
    >>> >> >>
    >>> >> >> Thanks again,
    >>> >> >> Tom
    >>> >> >>
    >>> >> >>
    >>> >> >> "Arvin Meyer [MVP]" <a@m.com> wrote in message
    >>> >> >> news:u5pOcj%23fGHA.1208@TK2MSFTNGP02.phx.gbl...
    >>> >> >>> Use a recordset, or DCount to check if there is an existing
    >>> >> >>> record.
    >>> > Use
    >>> >> >>> a
    >>> >> >>> unique compound index on the 2 fields to ensure there will be no
    >>> >> >>> duplicates.
    >>> >> >>>
    >>> >> >>> Sub CheckForDupe()
    >>> >> >>> Dim rst as Recordset
    >>> >> >>> Set rst = Me.RecordsetClone
    >>> >> >>>
    >>> >> >>> 'Try to find a matching record
    >>> >> >>> rst.FindFirst "[KeyField1] = " & Me![KeyField1] & " And
    >>> >> >>> [KeyField2]

    >> =
    >>> > "
    >>> >> >>> &
    >>> >> >>> Me![KeyField2]
    >>> >> >>>
    >>> >> >>> 'Has one been found?
    >>> >> >>> If Not rst.NoMatch Then
    >>> >> >>> 'If yes then
    >>> >> >>> Me.Undo
    >>> >> >>> Me.Bookmark = rst.BookMark
    >>> >> >>> End If
    >>> >> >>> End Sub
    >>> >> >>>
    >>> >> >>> Sub KeyField1_AfterUpdate()
    >>> >> >>> CheckForDupe
    >>> >> >>> End Sub
    >>> >> >>>
    >>> >> >>> Sub KeyField2_AfterUpdate()
    >>> >> >>> CheckForDupe
    >>> >> >>> End Sub
    >>> >> >>> --
    >>> >> >>> Arvin Meyer, MCP, MVP
    >>> >> >>> Microsoft Access
    >>> >> >>> Free Access downloads
    >>> >> >>> http://www.datastrat.com
    >>> >> >>> http://www.mvps.org/access
    >>> >> >>>
    >>> >> >>> "Tom" <partner1973@yahoo.com> wrote in message
    >>> >> >>> news:OyqzP$7fGHA.3456@TK2MSFTNGP05.phx.gbl...
    >>> >> >>>> Hi,
    >>> >> >>>>
    >>> >> >>>> I have a table:
    >>> >> >>>> tblGrade
    >>> >> >>>> ID
    >>> >> >>>> Vendor
    >>> >> >>>> Product
    >>> >> >>>> Grade
    >>> >> >>>>
    >>> >> >>>> I have a form to enter data to that table
    >>> >> >>>> >>>>
    >>> >> >>>> cboProduct
    >>> >> >>>> cboVendor
    >>> >> >>>> cboGrade
    >>> >> >>>>
    >>> >> >>>> now I have on after update event that see if that combination of
    >>> > vendor
    >>> >> >>> and
    >>> >> >>>> product exist.
    >>> >> >>>> if yes, a message popup "blah blah do you want to modify Grade?"
    >>> >> >>>> with
    >>> >> >>> YesNo
    >>> >> >>>> option.
    >>> >> >>>>
    >>> >> >>>> I need when the user choose yes that on the form that
    >>> >> >>>> combination
    >>> > form
    >>> >> >>>> tblGrade will appear and will be modified.
    >>> >> >>>> I dont want a new record to be created, so there 1 combination
    >>> >> >>>> for
    >>> > each
    >>> >> >>>> vendor and product.
    >>> >> >>>>
    >>> >> >>>> Thanks for your time and help,
    >>> >> >>>>
    >>> >> >>>> Tom
    >>> >> >>>>
    >>> >> >>>>
    >>> >> >>>
    >>> >> >>>
    >>> >> >>
    >>> >> >>
    >>> >> >
    >>> >> >
    >>> >>
    >>> >>
    >>> >
    >>> >
    >>>
    >>>

    >>
    >>

    >
    >
     
  11. Tom

    Tom
    Expand Collapse
    Guest

    ProductID not ProducyID
    "Tom" <partner1973@yahoo.com> wrote in message
    news:u8md8BNgGHA.4776@TK2MSFTNGP05.phx.gbl...
    >I tried to change the name of fields in tblGrades:
    > Product changed to ProducyID and Vendor was changed to VendorID.
    > I ended up with another error message:
    > Rum time error 3070:
    > Syntax error (missing operator) in expression.
    >
    > Thanks,
    > Tom
    > "Tom" <partner1973@yahoo.com> wrote in message
    > news:u8Va%23hMgGHA.1792@TK2MSFTNGP03.phx.gbl...
    >> Hi Arvin,
    >> The fields "Product" and "Vendor" in tblGrades are lookup fields.(I saw
    >> the article and I`m not sure it`s good).
    >> for both, data type is Number and field size is Long Integer. the value
    >> that actually you see in the table is text.
    >>
    >> Thanks,
    >> Tom
    >> "Arvin Meyer [MVP]" <a@m.com> wrote in message
    >> news:%23lko2TLgGHA.3916@TK2MSFTNGP04.phx.gbl...
    >>> Are you using lookup fields? By that I mean do you have combo boxes in
    >>> the
    >>> tables themselves?
    >>>
    >>> http://www.mvps.org/access/lookupfields.htm
    >>> --
    >>> Arvin Meyer, MCP, MVP
    >>> Microsoft Access
    >>> Free Access downloads
    >>> http://www.datastrat.com
    >>> http://www.mvps.org/access
    >>>
    >>>
    >>> "Tom" <partner1973@yahoo.com> wrote in message
    >>> news:#fyl6DIgGHA.4080@TK2MSFTNGP03.phx.gbl...
    >>>> Thanks Arvin for your time and patience.
    >>>> I followed your directions strictly, but I got this:
    >>>>
    >>>> run time error 3070:
    >>>> The Microsoft jet database engine does not recognize 'ProductID' as a
    >>> valid
    >>>> field name or expression.
    >>>>
    >>>> Please help, thanks
    >>>> Tom
    >>>>
    >>>>
    >>>>
    >>>>
    >>>> "Arvin Meyer [MVP]" <a@m.com> wrote in message
    >>>> news:e0flsUGgGHA.4864@TK2MSFTNGP05.phx.gbl...
    >>>> > OK Tom, I'll do the code with your control names. First, put the
    >>>> > first
    >>> sub
    >>>> > (CheckForDupe) in the form's code window without regard to a control.
    >>>> > It
    >>>> > should then show up as General and the sub's name. Also make sure the
    >>>> > FindFirst code is all on one line. I am assuming that the combos are
    >>>> > really
    >>>> > lookups for ProductID and VendorID and the bound field is the long
    >>>> > integer:
    >>>> >
    >>>> > Sub CheckForDupe()
    >>>> > Dim rst as Recordset
    >>>> > Set rst = Me.RecordsetClone
    >>>> >
    >>>> > ' Try to find a matching record
    >>>> > ' Next line is all on 1 line
    >>>> > rst.FindFirst "[ProductID] = " & Me![cboProduct] & " And [VendorID] =
    >>>> > "
    >>> &
    >>>> > Me![cboVendor]
    >>>> >
    >>>> > ' Has a record been found?
    >>>> > If Not rst.NoMatch Then
    >>>> > ' If yes then
    >>>> > Me.Undo
    >>>> > Me.Bookmark = rst.BookMark
    >>>> > End If
    >>>> > End Sub
    >>>> >
    >>>> > ' AfterUpdate code for Product
    >>>> > Sub cboProduct_AfterUpdate()
    >>>> > CheckForDupe
    >>>> > End Sub
    >>>> >
    >>>> > ' AfterUpdate code for Vendor
    >>>> > Sub cboVendor_AfterUpdate()
    >>>> > CheckForDupe
    >>>> > End Sub
    >>>> > --
    >>>> > Arvin Meyer, MCP, MVP
    >>>> > Microsoft Access
    >>>> > Free Access downloads
    >>>> > http://www.datastrat.com
    >>>> > http://www.mvps.org/access
    >>>> >
    >>>> >
    >>>> > "Tom" <partner1973@yahoo.com> wrote in message
    >>>> > news:eToBCkBgGHA.2456@TK2MSFTNGP04.phx.gbl...
    >>>> >> This event got me all confused and frustrated.
    >>>> >>
    >>>> >> I would like to restart from the beginning.
    >>>> >>
    >>>> >>
    >>>> >> I have a table "tblGrades": Index, Product, Vendor, Grade.
    >>>> >> I have a form "GradeFrm" with 3 ComboBox: Product, Vendor, Grade (In
    >>> that
    >>>> >> order).
    >>>> >>
    >>>> >> the goal is: in the table each record is unique, one combination of
    >>>> > vendor,
    >>>> >> product and grade.
    >>>> >> When a user fill the form, after the vendor was chosen and before
    >>>> >> updating
    >>>> >> the grade I want the system to check for that combination.
    >>>> >> if it exist then a message pop-up saying that, and ask the user if
    >>>> >> he
    >>>> >> want
    >>>> >> to change grade for that combination.
    >>>> >> If he choose yes, that specific record will show and the user will
    >>>> >> be
    >>>> >> able
    >>>> >> to choose a different grade.
    >>>> >>
    >>>> >> Thank you for reading this and for the help,
    >>>> >> Tom
    >>>> >>
    >>>> >>
    >>>> >>
    >>>> >>
    >>>> >>
    >>>> >>
    >>>> >> "Tom" <partner1973@yahoo.com> wrote in message
    >>>> >> news:Oh2pDyAgGHA.5092@TK2MSFTNGP04.phx.gbl...
    >>>> >> > Can I do something like that:
    >>>> >> >
    >>>> >> > If there is a duplicate and the user choose to modify the record
    >>>> >> > then
    >>>> > the
    >>>> >> > form will be open with that record.
    >>>> >> >
    >>>> >> > Maybe use to Dlookup: 1 to look for duplicate and second to open
    >>>> >> > the
    >>>> > form
    >>>> >> > with the record by Id.
    >>>> >> >
    >>>> >> > In case this is a good idea, how do I implement it?
    >>>> >> >
    >>>> >> > Thanks,
    >>>> >> > Tom
    >>>> >> >
    >>>> >> >
    >>>> >> > "Tom" <partner1973@yahoo.com> wrote in message
    >>>> >> > news:%23AvhnmAgGHA.2456@TK2MSFTNGP04.phx.gbl...
    >>>> >> >> Hi Arvin,
    >>>> >> >> Thank you for helping.
    >>>> >> >> 1.I tried to work with that code, it didnt do it (because of me).
    >>>> >> >> I`m not sure where to put the sub and how to integrate that
    >>>> >> >> sub
    >>> in
    >>>> > the
    >>>> >> >> AfterUpdate event with the message.
    >>>> >> >> 2. I tried to work wth Dcount as well, but I get mistyp error.
    >>>> >> >>
    >>>> >> >>
    >>>> >> >> Thanks again,
    >>>> >> >> Tom
    >>>> >> >>
    >>>> >> >>
    >>>> >> >> "Arvin Meyer [MVP]" <a@m.com> wrote in message
    >>>> >> >> news:u5pOcj%23fGHA.1208@TK2MSFTNGP02.phx.gbl...
    >>>> >> >>> Use a recordset, or DCount to check if there is an existing
    >>>> >> >>> record.
    >>>> > Use
    >>>> >> >>> a
    >>>> >> >>> unique compound index on the 2 fields to ensure there will be no
    >>>> >> >>> duplicates.
    >>>> >> >>>
    >>>> >> >>> Sub CheckForDupe()
    >>>> >> >>> Dim rst as Recordset
    >>>> >> >>> Set rst = Me.RecordsetClone
    >>>> >> >>>
    >>>> >> >>> 'Try to find a matching record
    >>>> >> >>> rst.FindFirst "[KeyField1] = " & Me![KeyField1] & " And
    >>>> >> >>> [KeyField2]
    >>> =
    >>>> > "
    >>>> >> >>> &
    >>>> >> >>> Me![KeyField2]
    >>>> >> >>>
    >>>> >> >>> 'Has one been found?
    >>>> >> >>> If Not rst.NoMatch Then
    >>>> >> >>> 'If yes then
    >>>> >> >>> Me.Undo
    >>>> >> >>> Me.Bookmark = rst.BookMark
    >>>> >> >>> End If
    >>>> >> >>> End Sub
    >>>> >> >>>
    >>>> >> >>> Sub KeyField1_AfterUpdate()
    >>>> >> >>> CheckForDupe
    >>>> >> >>> End Sub
    >>>> >> >>>
    >>>> >> >>> Sub KeyField2_AfterUpdate()
    >>>> >> >>> CheckForDupe
    >>>> >> >>> End Sub
    >>>> >> >>> --
    >>>> >> >>> Arvin Meyer, MCP, MVP
    >>>> >> >>> Microsoft Access
    >>>> >> >>> Free Access downloads
    >>>> >> >>> http://www.datastrat.com
    >>>> >> >>> http://www.mvps.org/access
    >>>> >> >>>
    >>>> >> >>> "Tom" <partner1973@yahoo.com> wrote in message
    >>>> >> >>> news:OyqzP$7fGHA.3456@TK2MSFTNGP05.phx.gbl...
    >>>> >> >>>> Hi,
    >>>> >> >>>>
    >>>> >> >>>> I have a table:
    >>>> >> >>>> tblGrade
    >>>> >> >>>> ID
    >>>> >> >>>> Vendor
    >>>> >> >>>> Product
    >>>> >> >>>> Grade
    >>>> >> >>>>
    >>>> >> >>>> I have a form to enter data to that table
    >>>> >> >>>> >>>>
    >>>> >> >>>> cboProduct
    >>>> >> >>>> cboVendor
    >>>> >> >>>> cboGrade
    >>>> >> >>>>
    >>>> >> >>>> now I have on after update event that see if that combination
    >>>> >> >>>> of
    >>>> > vendor
    >>>> >> >>> and
    >>>> >> >>>> product exist.
    >>>> >> >>>> if yes, a message popup "blah blah do you want to modify
    >>>> >> >>>> Grade?"
    >>>> >> >>>> with
    >>>> >> >>> YesNo
    >>>> >> >>>> option.
    >>>> >> >>>>
    >>>> >> >>>> I need when the user choose yes that on the form that
    >>>> >> >>>> combination
    >>>> > form
    >>>> >> >>>> tblGrade will appear and will be modified.
    >>>> >> >>>> I dont want a new record to be created, so there 1 combination
    >>>> >> >>>> for
    >>>> > each
    >>>> >> >>>> vendor and product.
    >>>> >> >>>>
    >>>> >> >>>> Thanks for your time and help,
    >>>> >> >>>>
    >>>> >> >>>> Tom
    >>>> >> >>>>
    >>>> >> >>>>
    >>>> >> >>>
    >>>> >> >>>
    >>>> >> >>
    >>>> >> >>
    >>>> >> >
    >>>> >> >
    >>>> >>
    >>>> >>
    >>>> >
    >>>> >
    >>>>
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
     
  12. Arvin Meyer [MVP]

    Arvin Meyer [MVP]
    Expand Collapse
    Guest

    Take your database, or better still a piece of it with the problem. Compact
    it, and zip it up. Go to my website (listed in my sig below) and find my
    email address. Send me your compacted zipped database via a clearly marked
    email subject: "TOM'S DATABASE in caps. I will post the answer for all to
    see at http://www.accessmvp.com

    --
    Arvin Meyer, MCP, MVP
    Microsoft Access
    Free Access downloads
    http://www.datastrat.com
    http://www.mvps.org/access

    "Tom" <partner1973@yahoo.com> wrote in message
    news:Om1R4JNgGHA.3588@TK2MSFTNGP04.phx.gbl...
    > ProductID not ProducyID
    > "Tom" <partner1973@yahoo.com> wrote in message
    > news:u8md8BNgGHA.4776@TK2MSFTNGP05.phx.gbl...
    > >I tried to change the name of fields in tblGrades:
    > > Product changed to ProducyID and Vendor was changed to VendorID.
    > > I ended up with another error message:
    > > Rum time error 3070:
    > > Syntax error (missing operator) in expression.
    > >
    > > Thanks,
    > > Tom
    > > "Tom" <partner1973@yahoo.com> wrote in message
    > > news:u8Va%23hMgGHA.1792@TK2MSFTNGP03.phx.gbl...
    > >> Hi Arvin,
    > >> The fields "Product" and "Vendor" in tblGrades are lookup fields.(I saw
    > >> the article and I`m not sure it`s good).
    > >> for both, data type is Number and field size is Long Integer. the value
    > >> that actually you see in the table is text.
    > >>
    > >> Thanks,
    > >> Tom
    > >> "Arvin Meyer [MVP]" <a@m.com> wrote in message
    > >> news:%23lko2TLgGHA.3916@TK2MSFTNGP04.phx.gbl...
    > >>> Are you using lookup fields? By that I mean do you have combo boxes in
    > >>> the
    > >>> tables themselves?
    > >>>
    > >>> http://www.mvps.org/access/lookupfields.htm
    > >>> --
    > >>> Arvin Meyer, MCP, MVP
    > >>> Microsoft Access
    > >>> Free Access downloads
    > >>> http://www.datastrat.com
    > >>> http://www.mvps.org/access
    > >>>
    > >>>
    > >>> "Tom" <partner1973@yahoo.com> wrote in message
    > >>> news:#fyl6DIgGHA.4080@TK2MSFTNGP03.phx.gbl...
    > >>>> Thanks Arvin for your time and patience.
    > >>>> I followed your directions strictly, but I got this:
    > >>>>
    > >>>> run time error 3070:
    > >>>> The Microsoft jet database engine does not recognize 'ProductID' as a
    > >>> valid
    > >>>> field name or expression.
    > >>>>
    > >>>> Please help, thanks
    > >>>> Tom
    > >>>>
    > >>>>
    > >>>>
    > >>>>
    > >>>> "Arvin Meyer [MVP]" <a@m.com> wrote in message
    > >>>> news:e0flsUGgGHA.4864@TK2MSFTNGP05.phx.gbl...
    > >>>> > OK Tom, I'll do the code with your control names. First, put the
    > >>>> > first
    > >>> sub
    > >>>> > (CheckForDupe) in the form's code window without regard to a

    control.
    > >>>> > It
    > >>>> > should then show up as General and the sub's name. Also make sure

    the
    > >>>> > FindFirst code is all on one line. I am assuming that the combos

    are
    > >>>> > really
    > >>>> > lookups for ProductID and VendorID and the bound field is the long
    > >>>> > integer:
    > >>>> >
    > >>>> > Sub CheckForDupe()
    > >>>> > Dim rst as Recordset
    > >>>> > Set rst = Me.RecordsetClone
    > >>>> >
    > >>>> > ' Try to find a matching record
    > >>>> > ' Next line is all on 1 line
    > >>>> > rst.FindFirst "[ProductID] = " & Me![cboProduct] & " And [VendorID]

    =
    > >>>> > "
    > >>> &
    > >>>> > Me![cboVendor]
    > >>>> >
    > >>>> > ' Has a record been found?
    > >>>> > If Not rst.NoMatch Then
    > >>>> > ' If yes then
    > >>>> > Me.Undo
    > >>>> > Me.Bookmark = rst.BookMark
    > >>>> > End If
    > >>>> > End Sub
    > >>>> >
    > >>>> > ' AfterUpdate code for Product
    > >>>> > Sub cboProduct_AfterUpdate()
    > >>>> > CheckForDupe
    > >>>> > End Sub
    > >>>> >
    > >>>> > ' AfterUpdate code for Vendor
    > >>>> > Sub cboVendor_AfterUpdate()
    > >>>> > CheckForDupe
    > >>>> > End Sub
    > >>>> > --
    > >>>> > Arvin Meyer, MCP, MVP
    > >>>> > Microsoft Access
    > >>>> > Free Access downloads
    > >>>> > http://www.datastrat.com
    > >>>> > http://www.mvps.org/access
    > >>>> >
    > >>>> >
    > >>>> > "Tom" <partner1973@yahoo.com> wrote in message
    > >>>> > news:eToBCkBgGHA.2456@TK2MSFTNGP04.phx.gbl...
    > >>>> >> This event got me all confused and frustrated.
    > >>>> >>
    > >>>> >> I would like to restart from the beginning.
    > >>>> >>
    > >>>> >>
    > >>>> >> I have a table "tblGrades": Index, Product, Vendor, Grade.
    > >>>> >> I have a form "GradeFrm" with 3 ComboBox: Product, Vendor, Grade

    (In
    > >>> that
    > >>>> >> order).
    > >>>> >>
    > >>>> >> the goal is: in the table each record is unique, one combination

    of
    > >>>> > vendor,
    > >>>> >> product and grade.
    > >>>> >> When a user fill the form, after the vendor was chosen and before
    > >>>> >> updating
    > >>>> >> the grade I want the system to check for that combination.
    > >>>> >> if it exist then a message pop-up saying that, and ask the user if
    > >>>> >> he
    > >>>> >> want
    > >>>> >> to change grade for that combination.
    > >>>> >> If he choose yes, that specific record will show and the user will
    > >>>> >> be
    > >>>> >> able
    > >>>> >> to choose a different grade.
    > >>>> >>
    > >>>> >> Thank you for reading this and for the help,
    > >>>> >> Tom
    > >>>> >>
    > >>>> >>
    > >>>> >>
    > >>>> >>
    > >>>> >>
    > >>>> >>
    > >>>> >> "Tom" <partner1973@yahoo.com> wrote in message
    > >>>> >> news:Oh2pDyAgGHA.5092@TK2MSFTNGP04.phx.gbl...
    > >>>> >> > Can I do something like that:
    > >>>> >> >
    > >>>> >> > If there is a duplicate and the user choose to modify the record
    > >>>> >> > then
    > >>>> > the
    > >>>> >> > form will be open with that record.
    > >>>> >> >
    > >>>> >> > Maybe use to Dlookup: 1 to look for duplicate and second to open
    > >>>> >> > the
    > >>>> > form
    > >>>> >> > with the record by Id.
    > >>>> >> >
    > >>>> >> > In case this is a good idea, how do I implement it?
    > >>>> >> >
    > >>>> >> > Thanks,
    > >>>> >> > Tom
    > >>>> >> >
    > >>>> >> >
    > >>>> >> > "Tom" <partner1973@yahoo.com> wrote in message
    > >>>> >> > news:%23AvhnmAgGHA.2456@TK2MSFTNGP04.phx.gbl...
    > >>>> >> >> Hi Arvin,
    > >>>> >> >> Thank you for helping.
    > >>>> >> >> 1.I tried to work with that code, it didnt do it (because of

    me).
    > >>>> >> >> I`m not sure where to put the sub and how to integrate that
    > >>>> >> >> sub
    > >>> in
    > >>>> > the
    > >>>> >> >> AfterUpdate event with the message.
    > >>>> >> >> 2. I tried to work wth Dcount as well, but I get mistyp error.
    > >>>> >> >>
    > >>>> >> >>
    > >>>> >> >> Thanks again,
    > >>>> >> >> Tom
    > >>>> >> >>
    > >>>> >> >>
    > >>>> >> >> "Arvin Meyer [MVP]" <a@m.com> wrote in message
    > >>>> >> >> news:u5pOcj%23fGHA.1208@TK2MSFTNGP02.phx.gbl...
    > >>>> >> >>> Use a recordset, or DCount to check if there is an existing
    > >>>> >> >>> record.
    > >>>> > Use
    > >>>> >> >>> a
    > >>>> >> >>> unique compound index on the 2 fields to ensure there will be

    no
    > >>>> >> >>> duplicates.
    > >>>> >> >>>
    > >>>> >> >>> Sub CheckForDupe()
    > >>>> >> >>> Dim rst as Recordset
    > >>>> >> >>> Set rst = Me.RecordsetClone
    > >>>> >> >>>
    > >>>> >> >>> 'Try to find a matching record
    > >>>> >> >>> rst.FindFirst "[KeyField1] = " & Me![KeyField1] & " And
    > >>>> >> >>> [KeyField2]
    > >>> =
    > >>>> > "
    > >>>> >> >>> &
    > >>>> >> >>> Me![KeyField2]
    > >>>> >> >>>
    > >>>> >> >>> 'Has one been found?
    > >>>> >> >>> If Not rst.NoMatch Then
    > >>>> >> >>> 'If yes then
    > >>>> >> >>> Me.Undo
    > >>>> >> >>> Me.Bookmark = rst.BookMark
    > >>>> >> >>> End If
    > >>>> >> >>> End Sub
    > >>>> >> >>>
    > >>>> >> >>> Sub KeyField1_AfterUpdate()
    > >>>> >> >>> CheckForDupe
    > >>>> >> >>> End Sub
    > >>>> >> >>>
    > >>>> >> >>> Sub KeyField2_AfterUpdate()
    > >>>> >> >>> CheckForDupe
    > >>>> >> >>> End Sub
    > >>>> >> >>> --
    > >>>> >> >>> Arvin Meyer, MCP, MVP
    > >>>> >> >>> Microsoft Access
    > >>>> >> >>> Free Access downloads
    > >>>> >> >>> http://www.datastrat.com
    > >>>> >> >>> http://www.mvps.org/access
    > >>>> >> >>>
    > >>>> >> >>> "Tom" <partner1973@yahoo.com> wrote in message
    > >>>> >> >>> news:OyqzP$7fGHA.3456@TK2MSFTNGP05.phx.gbl...
    > >>>> >> >>>> Hi,
    > >>>> >> >>>>
    > >>>> >> >>>> I have a table:
    > >>>> >> >>>> tblGrade
    > >>>> >> >>>> ID
    > >>>> >> >>>> Vendor
    > >>>> >> >>>> Product
    > >>>> >> >>>> Grade
    > >>>> >> >>>>
    > >>>> >> >>>> I have a form to enter data to that table
    > >>>> >> >>>> >>>>
    > >>>> >> >>>> cboProduct
    > >>>> >> >>>> cboVendor
    > >>>> >> >>>> cboGrade
    > >>>> >> >>>>
    > >>>> >> >>>> now I have on after update event that see if that combination
    > >>>> >> >>>> of
    > >>>> > vendor
    > >>>> >> >>> and
    > >>>> >> >>>> product exist.
    > >>>> >> >>>> if yes, a message popup "blah blah do you want to modify
    > >>>> >> >>>> Grade?"
    > >>>> >> >>>> with
    > >>>> >> >>> YesNo
    > >>>> >> >>>> option.
    > >>>> >> >>>>
    > >>>> >> >>>> I need when the user choose yes that on the form that
    > >>>> >> >>>> combination
    > >>>> > form
    > >>>> >> >>>> tblGrade will appear and will be modified.
    > >>>> >> >>>> I dont want a new record to be created, so there 1

    combination
    > >>>> >> >>>> for
    > >>>> > each
    > >>>> >> >>>> vendor and product.
    > >>>> >> >>>>
    > >>>> >> >>>> Thanks for your time and help,
    > >>>> >> >>>>
    > >>>> >> >>>> Tom
    > >>>> >> >>>>
    > >>>> >> >>>>
    > >>>> >> >>>
    > >>>> >> >>>
    > >>>> >> >>
    > >>>> >> >>
    > >>>> >> >
    > >>>> >> >
    > >>>> >>
    > >>>> >>
    > >>>> >
    > >>>> >
    > >>>>
    > >>>>
    > >>>
    > >>>
    > >>
    > >>

    > >
    > >

    >
    >
     

Share This Page