COMBOBOX AFTER UPDATE EVENT AND embedded macro

DevAccess

Registered User.
Local time
Today, 08:54
Joined
Jun 27, 2016
Messages
321
hello

On combobox after event I have macro field and has searchrecord condition in there I have following where condition, it is not working as expected

="[VENDORID] ='" & [Screen].[ActiveControl] & "' AND [PLANNED ID] = " & [Screen].[ActiveControl] & ""

VENDOR ID CAN EXPECT NUMBER AND TEXT BOTH while planned id is number field.

Please help.
 
What exactly does "not working as expected" mean? It seems odd to compare two different fields to the same control.
 
What exactly does "not working as expected" mean? It seems odd to compare two different fields to the same control.

I am searching the record and populating them

below works and populates the field based on combobox selection.
="[vendorid]= " & "'" & [Screen].[ActiveControl] & "'"

and I want to add one more conditing which is numberic comparsion with planned ID

and if I do this thing does not work.


="[vendorid] = " & "'" & [Screen].[ActiveControl] & "'" & "and [plannedID] =" & "" & [Screen].[ActiveControl] & ""

this does not work.
 
But activecontrol is the same, so you're comparing two different fields to the same value. Is that really what you want?
 
But activecontrol is the same, so you're comparing two different fields to the same value. Is that really what you want?

I really dont know about active control and how they works,

first condition was working so I put seocnd condition, vendorID and plannedID are alias we have created.

In fact in combobox we have multiple different value for same id for example

PlannedID VendorID

1 "test"

2 "test2"

1 "test1"

So always first value gets populated not the otherone with same ID.

So I wanted to add and condition with planned ID as well.
 
Try

="[VENDORID] ='" & [Screen].[ActiveControl].Column(1) & "' AND [PLANNED ID] = " & [Screen].[ActiveControl]
 

Users who are viewing this thread

Back
Top Bottom