If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
DLast cont...
Arggh - I have tried all of the suggestions and am still not quite there. I
think I am so close but missing a key element. SAMPLEID is the Autonumber (unique) Primary key in ptbl_MASTER_SAMPLE that links to ptbl_FISH_INDIV. I would like the default value to be the most recent date entered into the subform (not the entire dataset). So, from what I Understand, I should use: DMax("[DATE_VIDEO]","[ptbl_FISH_INDIV]","[SAMPLEID]"="[ptbl_MASTER_SAMPLE].[SAMPLEID]") But the result is blank. I appreciate your help and your patience (I am a bit green with these type of controls). Thanks! |
#2
|
|||
|
|||
DLast cont...
So, from what I Understand, I should use:
DMax("[DATE_VIDEO]","[ptbl_FISH_INDIV]","[SAMPLEID]"="[ptbl_MASTER_SAMPLE].[SAMPLEID]") But the result is blank. I appreciate your help and your patience (I am a bit green with these type of controls). Thanks! If SAMPLEID is a text field, do this: DMax("[DATE_VIDEO]","[ptbl_FISH_INDIV]","[SAMPLEID]= '" & [ptbl_MASTER_SAMPLE].[SAMPLEID] & "'"") If it's a numeric field, do this: DMax("[DATE_VIDEO]","[ptbl_FISH_INDIV]","[SAMPLEID]= " & [ptbl_MASTER_SAMPLE].[SAMPLEID]) Tom Lake |
#3
|
|||
|
|||
DLast cont...
On Tue, 24 Oct 2006 08:43:02 -0700, Beks
wrote: Arggh - I have tried all of the suggestions and am still not quite there. I think I am so close but missing a key element. SAMPLEID is the Autonumber (unique) Primary key in ptbl_MASTER_SAMPLE that links to ptbl_FISH_INDIV. I would like the default value to be the most recent date entered into the subform (not the entire dataset). So, from what I Understand, I should use: DMax("[DATE_VIDEO]","[ptbl_FISH_INDIV]","[SAMPLEID]"="[ptbl_MASTER_SAMPLE].[SAMPLEID]") But the result is blank. I appreciate your help and your patience (I am a bit green with these type of controls). Thanks! This will find all records where the SampleID caontains the text string [ptbl_MASTER_SAMPLE].[SAMPLEID]. I doubt that there will be any... You need to concatenate the VALUE of [ptbl_MASTER_SAMPLE].[SAMPLEID], not its name. Try DMax("[DATE_VIDEO]","[ptbl_FISH_INDIV]","[SAMPLEID]=" & [ptbl_MASTER_SAMPLE].[SAMPLEID]) This will take the text string "[SAMPLEID]=" and concatenate the value of the field SAMPLEID from ptbl_MASTER_SAMPLE; if that value is 12651, you'll get [SAMPLEID]=12651 and should get the result that you want. John W. Vinson[MVP] |
Thread Tools | |
Display Modes | |
|
|