Access Learner - Need Help with DoCmd.OpenForm to multiple criteria (1 Viewer)

pbaldy

Wino Moderator
Staff member
Local time
Today, 10:59
Joined
Aug 30, 2003
Messages
36,135
Can you post the db here?
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 10:59
Joined
Aug 30, 2003
Messages
36,135
There is no field in that table named TransactionID. Is this what you meant?

Me.cboTransactionType = DLookup("TransactionTypeID", "T_TransactionType", "TransactionType='" & strOpenArgs(1) & "'")
 

F.I.G.

Registered User.
Local time
Today, 10:59
Joined
Mar 4, 2012
Messages
29
What I want to achieve, when a user double on any selection in the list box, the value of the last column (new loan, renewal or amendment) to pass onto the unbound combo box "cboTransactionType" of F_LoanDocuments. Then that value will be the default value for "TransactionTypeID" of new record. Is that possible?
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 10:59
Joined
Aug 30, 2003
Messages
36,135
Did the code I posted do what you want?
 

F.I.G.

Registered User.
Local time
Today, 10:59
Joined
Mar 4, 2012
Messages
29
Happy to help!

Hi Paul,

To better understand, I would greatly appreciate if you could explain the purpose of those apostrophes ( ' )

Me.cboTransactionType = DLookup("TransactionTypeID", "T_TransactionType", "TransactionType='" & strOpenArgs(1) & "'")

Thank you.
Van
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 10:59
Joined
Aug 30, 2003
Messages
36,135
For a text data type you add quotes. Without the concatenation, you'd have:

TransactionType = 'abc'

whereas a numeric data type would look like:

TransactionType = 123

The apostrophes I added were to achieve that.
 

Users who are viewing this thread

Top Bottom