Trouble with DLookup and adding information

  • Thread starter Thread starter Jay Magness
  • Start date Start date
J

Jay Magness

Hi all,

I am using DLookup in a subform and for some reason the
data is not updating. Here is the deal. I can run the
DLookup when I run the subform as a root form, but when I
add the Master form to the formula I get no error and the
data is not added to the table.

I think the formula is working since I do not get any
errors, but it is just not add the data.

Any ideas?

Actual Formula:

[MatDecsripton] = DLookup("[Descr]", "[vendorq1]", "[item]
=Forms!PEntery1!Mattbl1![MatItemc]")

[MatDecsripton] = Field to be updated with lookedup data

[Descr] = Field to pull the data from
[vendorq1] = Tble to get the data to be added

[item] = Field to Index on in the Dta Source Table

PEntery1 = Main Form

Mattbl1 = Subform Name

[MatItemc] = Criteria Field

Thank you in advance for your input and help,

Jay
 
Jay,

DLookUp just gets a value for the variable,
[MatDecsripton]. To change the value in the underlying
table use the .update method or the .add method depending
on whether you are changing the field or adding a record.

Good luck
Maxine
No Reply EMail Please
 
Hi,

The update worked when I used the subform as a master
form. Only when the form becomes a subform do I ahve the
problem.

Jay
-----Original Message-----
Jay,

DLookUp just gets a value for the variable,
[MatDecsripton]. To change the value in the underlying
table use the .update method or the .add method depending
on whether you are changing the field or adding a record.

Good luck
Maxine
No Reply EMail Please
-----Original Message-----
Hi all,

I am using DLookup in a subform and for some reason the
data is not updating. Here is the deal. I can run the
DLookup when I run the subform as a root form, but when I
add the Master form to the formula I get no error and the
data is not added to the table.

I think the formula is working since I do not get any
errors, but it is just not add the data.

Any ideas?

Actual Formula:

[MatDecsripton] = DLookup ("[Descr]", "[vendorq1]", "[item]
=Forms!PEntery1!Mattbl1![MatItemc]")

[MatDecsripton] = Field to be updated with lookedup data

[Descr] = Field to pull the data from
[vendorq1] = Tble to get the data to be added

[item] = Field to Index on in the Dta Source Table

PEntery1 = Main Form

Mattbl1 = Subform Name

[MatItemc] = Criteria Field

Thank you in advance for your input and help,

Jay

.
.
 
Back
Top