Simply DLookup Problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form which, based on the date in the Called_On field on the form
needs to:
1) search tblDailyComments for the date and bring back the DailyComments
data in tblDailyComments.
2) DailyComments needs to be opened for editing.

The application of this field is if something unusual happens while the
person is on the phone through-out the day, this field can act as a simple
log of events for that day.

The two problems I am having is I can not pull up the data from
tblDailyComments and display them in the foorm frmCalling field
txtDailyComments, and I suspect I will not be able to edit DailyComments via
frmCalling 's txtDailyCOmments field. Here is what I have:

Me.txtDailyComments = DLookup("[DailyComments]", "tblDailyComments", "[Date]
= " & Me.CALLED_ON)

DailyComments: the comments field in tblDailyComments
Date: the primary Key containing the date; field in tblDailyComments
Called_ON: When the call was made. From form tblCandidates.

Thanks.
 
Rod,

I suggest you make a continuous view form to show the data from the
DailyComments field from the tblDailyComments table. Then put this onto
the existing form as a subform. You can then set the Link Master Fields
property of the subform to the Called_On field in the main form, and its
Link Child Fields property to the [Date] field.
 
DLookup only returns the current value of an existing field (or NULL).

Create a sub form using tblDailyComments.
Drop onto main form and link master/child fields using CALLED_ON/[Date].

Hope I'm on the right lines - John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top