PC Review


Reply
Thread Tools Rate Thread

how do I update a field in a table thru a dlookup in a unbound txt

 
 
=?Utf-8?B?SmVmZg==?=
Guest
Posts: n/a
 
      14th Jun 2005
Hi all,

I have form with listbox, subform and an unbounded txtbox.

When a user clicks on a listbox, it'll fill out subform and txtbox
(txtbox control source using dlookup). Txtbox pulls up info from the table
just fine, but users are unable to edit - "control can't be edited; it's
bound to the expression 'Dlookup(.....)'.
Is there a way to work around it?

Thanks,



 
Reply With Quote
 
 
 
 
=?Utf-8?B?T2Zlcg==?=
Guest
Posts: n/a
 
      14th Jun 2005
If the form where the text box is unbound, then bound it to the table you
using for the dlookup, filter the recordsource to the list box for the
filter, and on the after update event of the list box, run the code
me.requery.
Bound the text box to the field, and now you can edit it, the requery will
bring the right value.

Or
On the after update event of the list box write,
me.textboxname = dlookup()
and leave the text box unbound, on the after update event of the text box
run an update sql to update the table

"Jeff" wrote:

> Hi all,
>
> I have form with listbox, subform and an unbounded txtbox.
>
> When a user clicks on a listbox, it'll fill out subform and txtbox
> (txtbox control source using dlookup). Txtbox pulls up info from the table
> just fine, but users are unable to edit - "control can't be edited; it's
> bound to the expression 'Dlookup(.....)'.
> Is there a way to work around it?
>
> Thanks,
>
>
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Update table from unbound field in form MyMel Microsoft Access Forms 1 24th Nov 2009 09:39 PM
update table field from unbound form control =?Utf-8?B?UGF0cmljaw==?= Microsoft Access VBA Modules 1 17th Aug 2007 06:53 AM
dlookup in unbound field =?Utf-8?B?U2Vhbks2ODc2?= Microsoft Access 4 20th Dec 2005 12:41 PM
Update table field from a unbound form =?Utf-8?B?Um9ueQ==?= Microsoft Access 2 3rd Dec 2005 09:17 PM
how do I update a field in a table thru a dlookup in a unbound txt =?Utf-8?B?SmVmZg==?= Microsoft Access Forms 1 14th Jun 2005 07:58 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:43 PM.