469,604 Members | 2,376 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,604 developers. It's quick & easy.

Dynamic Button For Each Record And Event Behind it

Hi Guys, First of All, Hi to Everybody. This is my first post here and hope to have long time with you guys. SO Coming to the point. I am new in Access and lots of things to cope with.

At the momment I am trying to build a sunform that is linked to the main form and what I want to do is for contenuous form is to Create a Command button for each record and pressing that button shoud update that record for some specific criteria. SO In short How can we Dynamically create a cmdButton For each Record and How to write its event that could be linked towards that specific record it is linked with(the row it is in).

Or if having a Check box is an option. Please direct because I dont know either how to do that.
Sep 17 '06 #1
3 3384
1,418 Expert 1GB

In fact it is possible to accompish this task...

But what information would you like to have in your records that will refer to different events, functions and procedures?

Maybe you will have a hyperlink information???

Please tell us more...

Sep 17 '06 #2
Thanks for replying. Actually I have two different things to do.

one is for every Command button pressed should the corrsponding row have some values updated. Some shown on the subform NOW and some in the back ground.

Second I am not even sure how can man have one button on the form and instead of command buttons to put check boxes in front of each record and one command button to look through all and updated only corrsponding records where check box checked or not.

I have tried to use the clink event of check box for the following code
if checkbox1 = true then
Update abc....
Update xyz...
end if

problem is this time I am updating the same record that is in this row and I get error that this record is already being used.

So Above mentioned are two different situations.
i am sorry for mixing two things but it is same problem that i am trying to solve in best possible way.

Waitting for your advice. Cheers.
Sep 18 '06 #3
1,418 Expert 1GB

It's good to you use bound check box in your continious form!

In After Update Event you can Update your fields! Exemple

Expand|Select|Wrap|Line Numbers
  1. If Me![Checkbox}=True then
  2. Me![Field1]="abc"
  3. else
  4. Me![Field1]="cdef"
  5. end if
Sep 19 '06 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Nathan Bloomfield | last post: by
1 post views Thread by Boban Dragojlovic | last post: by
3 posts views Thread by Leo J. Hart IV | last post: by
3 posts views Thread by NateDawg | last post: by
reply views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.