J
Jimmy Warpup
this line
DLookup("[French_Word]", "[words]", "[French_Word] = """ & Me![French_Word]
& """")
outputs any word in the "french_word" field of the "words" table where that
value is the same as the value entered into the form.
this line
DLookup("[English_Translation]", "[words]", "[French_Word] = """ &
Me![French_Word] & """")
refrences the "English translation" field on the "words" form. I need the
field from the table.
I don't want to re-write the code, it's a learning thing. I only want to
know how to fix the second line to refrence the table not the field.
here's the context.
Private Sub French_word_BeforeUpdate(Cancel As Integer)
'B = DLookup("[English_Translation]", "[words]", "[French_Word] = """ &
Me![French_Word] & """")
A = IsNull(DLookup("[French_Word]", "[words]", "[French_Word] = """ &
Me![French_Word] & """"))
Select Case A
Case False
MsgBox "The word " & Me!French_Word & " has already been entered.
It means " & B
Cancel = True
Exit Sub
Case Else
Exit Sub
End Select
End Sub
DLookup("[French_Word]", "[words]", "[French_Word] = """ & Me![French_Word]
& """")
outputs any word in the "french_word" field of the "words" table where that
value is the same as the value entered into the form.
this line
DLookup("[English_Translation]", "[words]", "[French_Word] = """ &
Me![French_Word] & """")
refrences the "English translation" field on the "words" form. I need the
field from the table.
I don't want to re-write the code, it's a learning thing. I only want to
know how to fix the second line to refrence the table not the field.
here's the context.
Private Sub French_word_BeforeUpdate(Cancel As Integer)
'B = DLookup("[English_Translation]", "[words]", "[French_Word] = """ &
Me![French_Word] & """")
A = IsNull(DLookup("[French_Word]", "[words]", "[French_Word] = """ &
Me![French_Word] & """"))
Select Case A
Case False
MsgBox "The word " & Me!French_Word & " has already been entered.
It means " & B
Cancel = True
Exit Sub
Case Else
Exit Sub
End Select
End Sub