dbTalk Databases Forums  

Using VBA to modify field in current record

comp.databases.ms-access comp.databases.ms-access


Discuss Using VBA to modify field in current record in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Erik
 
Posts: n/a

Default Using VBA to modify field in current record - 07-20-2010 , 02:35 AM






I have a form that lists several records in a row. I want to be able
to click a checkmark and autopopulate specific fields with preset data
based on the checkmark. I feel that I can do this pretty easily, but
the problem I am encountering is that when I click the checkmark, it
applies the values to every record, not just the current record I
would like to modify. If my form only showed one record, I wouldn't
have this problem but I want my form to list each record in a list so
I need to figure out how to isolate the record in the code.

For this form, everything is stored in a table called: tbl_Missions

My records are set unique by a text value called: MSN_ID

When I click the checkbox, I want to populate the textbox "Remarks"
and the textbox "Operation" with preset data specified through code.

Reply With Quote
  #2  
Old   
John Spencer
 
Posts: n/a

Default Re: Using VBA to modify field in current record - 07-20-2010 , 07:12 AM






You need to share the code you are using.

Also, the assumption is that the checkbox is not bound to a field. If the
checkbox is bound to field, that may change the behavior of your code.

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

Erik wrote:
Quote:
I have a form that lists several records in a row. I want to be able
to click a checkmark and autopopulate specific fields with preset data
based on the checkmark. I feel that I can do this pretty easily, but
the problem I am encountering is that when I click the checkmark, it
applies the values to every record, not just the current record I
would like to modify. If my form only showed one record, I wouldn't
have this problem but I want my form to list each record in a list so
I need to figure out how to isolate the record in the code.

For this form, everything is stored in a table called: tbl_Missions

My records are set unique by a text value called: MSN_ID

When I click the checkbox, I want to populate the textbox "Remarks"
and the textbox "Operation" with preset data specified through code.

Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.