How to set default value from single row Query using DlookUP?

Ariful Islam

New member
Local time
Today, 11:49
Joined
Nov 21, 2017
Messages
8
I want to set default value in field [PassMark] in [Table1] from Query1 using DlookUP.
 

Attachments

Last edited:
You cannot change table level properties on the fly. You could do this on a form though. I would use the BeforeInsert event to run the DLookup(). The form's BeforeInsert event runs only ONCE, immediately after the first character is typed to dirty the form.
 
I am a novice access user. Would you please add a default value on MarkEntry form from Query1 in my file?
I'll be grateful.
Please....
 

Attachments

you need to put DepartmentID (long integer)
to table1. on the form,
change departmentID to combobox.
the rowsource of the combo
is table2. see sample db.
 

Attachments

Sir, I want to set default value of field [PassMark] of [Table1] from field [defaultValue] of Query1 through forms!MarkEntry!PassMark.
Please help me.
 
Last edited:
do you have any logic or
calculation how to obtain that
from query1. and besides,
query1 is parameter query
which points to the form
DeptSelector.

i made another query, Query2.
i sort it in descending order.
when you enter number on Mark Obtained
textbox of form MarkEntry, it will
lookup the value which is less or equal
to the number you enter on the textbox.
try if this is what you intend.
 

Attachments

Users who are viewing this thread

Back
Top Bottom