K
Karen
I want to be able to have the users of my program open a form and enter a
product code, view the data for that product and then click a button to copy
the data to a new record in the tables. I have the search working. When I
do the copy (I have dim'd variables and done vardesc = me![flddesc]) and
open the form to add a new record the data doesn't 'paste' in with the
me!flddesc = vardesc. The frmnew reagent opens. I am pasting the code in
below. Please reply with any assistance. Thank you.
Karen
-----------------------------------
'save all flds from form to variables
Dim vardesc As Variant, vardesc2 As Variant, varcrdate As Variant
Dim varinit As Variant, varoffshore As Variant, varbatchmin As Variant,
varbatchmax As Variant
Dim varshelflife As Variant, varexpires As Variant, varprep As Variant
Dim varspecreq As Variant, varqcsafe As Variant, varqccheck As Variant
vardesc = Me![flddesc]
vardesc2 = Me![flddesc2]
varbatchmin = Me![fldbatchmin]
varprep = Me![fldprepproc]
' open frm new reagent
DoCmd.OpenForm "frmnew reagent", acNormal, , , acFormPropertySettings,
acWindowNormal
'fill in flds w/ variables
Me![flddesc] = vardesc
Me![fldprepproc] = varprep
product code, view the data for that product and then click a button to copy
the data to a new record in the tables. I have the search working. When I
do the copy (I have dim'd variables and done vardesc = me![flddesc]) and
open the form to add a new record the data doesn't 'paste' in with the
me!flddesc = vardesc. The frmnew reagent opens. I am pasting the code in
below. Please reply with any assistance. Thank you.
Karen
-----------------------------------
'save all flds from form to variables
Dim vardesc As Variant, vardesc2 As Variant, varcrdate As Variant
Dim varinit As Variant, varoffshore As Variant, varbatchmin As Variant,
varbatchmax As Variant
Dim varshelflife As Variant, varexpires As Variant, varprep As Variant
Dim varspecreq As Variant, varqcsafe As Variant, varqccheck As Variant
vardesc = Me![flddesc]
vardesc2 = Me![flddesc2]
varbatchmin = Me![fldbatchmin]
varprep = Me![fldprepproc]
' open frm new reagent
DoCmd.OpenForm "frmnew reagent", acNormal, , , acFormPropertySettings,
acWindowNormal
'fill in flds w/ variables
Me![flddesc] = vardesc
Me![fldprepproc] = varprep