PC Review


Reply
Thread Tools Rate Thread

ComboBox: Update a value in current record before changing the ComboBox Value

 
 
disneygoof via AccessMonster.com
Guest
Posts: n/a
 
      7th Mar 2008
It's been a while since I have had any issues...I seem to create my own
problems...

I have a combo box in a sunform. I use the combobox to choice multiple items
in the subform. When I pick and item in the combobox, I run an AFTER UPDATE
and set a value in a table (I change a 0 to a 5). However, if I picked the
wrong record and go and change it to a different record, the value I set to 5
above stays a 5 and know I have a record with a value I do not want...I want
to change it back to 0 before I change the record in the combobox. I have
tried Before Update, On Enter, On Get Focus...these don't work...

Why do I do this...later in the Main form I click a button that runs a few
sql queries and they look at the value in the table and perform tasks...which
all works very well!

So, how can I change the current record value, before I update the combobox
to the new record...

Thanks
D.

--
David (Disneygoof)

Message posted via http://www.accessmonster.com

 
Reply With Quote
 
 
 
 
miss031
Guest
Posts: n/a
 
      8th Mar 2008
Would the AfterUpdate code not run again if you change the value back to the
correct one, and successively each time you change it?

"disneygoof via AccessMonster.com" wrote:

> It's been a while since I have had any issues...I seem to create my own
> problems...
>
> I have a combo box in a sunform. I use the combobox to choice multiple items
> in the subform. When I pick and item in the combobox, I run an AFTER UPDATE
> and set a value in a table (I change a 0 to a 5). However, if I picked the
> wrong record and go and change it to a different record, the value I set to 5
> above stays a 5 and know I have a record with a value I do not want...I want
> to change it back to 0 before I change the record in the combobox. I have
> tried Before Update, On Enter, On Get Focus...these don't work...
>
> Why do I do this...later in the Main form I click a button that runs a few
> sql queries and they look at the value in the table and perform tasks...which
> all works very well!
>
> So, how can I change the current record value, before I update the combobox
> to the new record...
>
> Thanks
> D.
>
> --
> David (Disneygoof)
>
> Message posted via http://www.accessmonster.com
>
>

 
Reply With Quote
 
disneygoof via AccessMonster.com
Guest
Posts: n/a
 
      17th Mar 2008
I tried a nubmer of AfterUpdate code and I could not get it to work...I just
re-wrote everything differnetly...now I get what I want to happen

THANK YOU miss031

miss031 wrote:
>Would the AfterUpdate code not run again if you change the value back to the
>correct one, and successively each time you change it?
>
>> It's been a while since I have had any issues...I seem to create my own
>> problems...

>[quoted text clipped - 16 lines]
>> Thanks
>> D.


--
David (Disneygoof)

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...oding/200803/1

 
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
Dependant Combobox not showing current value if record viewed =?Utf-8?B?UHVyZVJhZGlhbnRKb3k=?= Microsoft Access Form Coding 1 23rd Aug 2007 11:49 PM
ComboBox Current Record Pointer =?Utf-8?B?U3RldmUgUw==?= Microsoft Access Form Coding 3 25th Oct 2006 01:57 AM
Bind / Synchronize a comboBox to a filed the current record dbuchanan Microsoft VB .NET 1 15th May 2005 05:19 PM
Bind a comboBox to the current record in the dataset dbuchanan Microsoft Dot NET Framework Forms 0 11th May 2005 11:27 PM
Use ComboBox to select Current Record in Databinding? Luther Miller Microsoft Dot NET Framework Forms 0 10th Dec 2003 01:03 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:51 AM.