I have a textbox (txtbox) in access whose content is based upon a combobox (cmbbox) on another form (myform). cmbbox is bound to a lookup table. cmbbox displays text. I also have a function called getContent whose code is as follows:
public function getcontent() as string
getcontent = Forms!myform!cmbbox.Column(1, Forms!myform!cmbbox.ListIndex)
end function
If I set the "Control Source" property in txtbox to "=Forms!myform!cmbbox.Column(1, Forms!myform!cmbbox.ListIndex)", Access 2013 will automatically change it to "=[Forms]![myform]![cmbbox].[Column](1,[Forms]![myform]![cmbbox].
[ListIndex])" and display a strange number instead of the text shown in cmbbox.
However, if I set the "Control Source" property in txtbox to "=getContent()", txtbox will display the text in shown in cmbbox.
Am I missing something here? The information retrieved by getcontent and txtbox is exactly the same. Thanks in advance.