Results 1 to 12 of 12
  1. #1
    senthilrg is offline Novice
    Windows XP Access 2003
    Join Date
    Dec 2009
    Posts
    8

    Thumbs down Checkbox in continous form

    Dears,



    I have checkbox and text box in details section of my subform which is continous form.

    If i click on the checkbox the textbox in corresponding row needs to be updated

    row1 chk1 txt1
    row2 chk2 txt2

    the chkbox click event is working only for first textbox

    Pls help

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows XP Access 2002
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    The controls on a continuous form need to be bound to a field of the RecordSource for them to behave differently for each record.

  3. #3
    senthilrg is offline Novice
    Windows XP Access 2003
    Join Date
    Dec 2009
    Posts
    8

    RE:Checkbox in continous form

    Yes the textbox is bounded to a field in database.

    since the form is continous subform, the controls in the detailed section will be repeated as per the number of records.

    each row will have say for example.

    Chkbox1 txtbox1
    chkbox1 txtbox1

    two rows.

    if user clicks the chkbox the txtbox in the corressponding row should get value of say 10.

    I have written a function in the chkbox click event some thing like this

    if me.chkbox==-1 then
    me.txtbox.value="10"
    end if

    But this changes the txtbox for all rows to 10 i need only for 1 row

    hope u understood

    Or pls give some other solution to do this......

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows XP Access 2002
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Are you sure the TextBox has a ControlSource of a field in the RecordSource of the form? How about the CheckBox?

  5. #5
    senthilrg is offline Novice
    Windows XP Access 2003
    Join Date
    Dec 2009
    Posts
    8

    RE:Checkbox in continous form

    Thank u,

    I have replaced the coding from checkbox click event to checkbox after update event its working fine now..

    In checkbox click event i have:

    if me.chkbox =-1 then
    me.txt1.value=me.frm1.txt2.value
    end if

    i transfered the code to checkbox afterupdate event


    Thank u for the help

  6. #6
    senthilrg is offline Novice
    Windows XP Access 2003
    Join Date
    Dec 2009
    Posts
    8

    Thumbs down Set combo box value based on selection

    Hi!

    I have serious problem.

    i have button which opens a pop up form (form1). In the form1 i have label button if i click on label button the value should be displayed in the combo box (Combo box is in continous subform).

    I used "form1.subform1.controls("combo1").value="test ""

    But if i want to add another value by clicking on pop up form its just replacing the value of first combo box in subform i just want to add another combo box below the first one and so on..

    Hope u understand my situation

    Thank u

  7. #7
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows XP Access 2002
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Quote Originally Posted by senthilrg View Post
    Thank u,

    I have replaced the coding from checkbox click event to checkbox after update event its working fine now..

    In checkbox click event i have:

    if me.chkbox =-1 then
    me.txt1.value=me.frm1.txt2.value
    end if

    i transfered the code to checkbox afterupdate event


    Thank u for the help
    This syntax is not correct. the line should read:
    me.txt1.value=me.txt2.value

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows XP Access 2002
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Quote Originally Posted by senthilrg View Post
    Hi!

    I have serious problem.

    i have button which opens a pop up form (form1). In the form1 i have label button if i click on label button the value should be displayed in the combo box (Combo box is in continous subform).

    I used "form1.subform1.controls("combo1").value="test ""

    But if i want to add another value by clicking on pop up form its just replacing the value of first combo box in subform i just want to add another combo box below the first one and so on..

    Hope u understand my situation

    Thank u
    I'm sorry but I do not understand this issue. Are you trying to add another ComboBox to subform1 or just another value to the RowSource of the control?

  9. #9
    senthilrg is offline Novice
    Windows XP Access 2003
    Join Date
    Dec 2009
    Posts
    8

    Re:Combo box

    hi
    I have corrected the syntax but syntax is not my problem....
    let me explain the issue clearly..
    i have mainform with subforms say subform1 and subform2 with combobox controls in it which is bounded to the recordsource of table.
    Both subforms are continous form..
    when i click on the button in the mainform an another pop up form opens which has
    lbl1 txt1
    lbl2 txt2
    .....

    if i click on the lbl1 of pop up form the value of txt1 should displayed in the first combo box in subform1
    if i click on the lbl2 of pop up form the value of txt2 should be displayed in the next combo box of subform1
    if the first combo box is not filled
    ...

    and so on
    Hope u got some clues...
    Have nice day

  10. #10
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows XP Access 2002
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    How about posting a sample db for us to play with?

  11. #11
    senthilrg is offline Novice
    Windows XP Access 2003
    Join Date
    Dec 2009
    Posts
    8

    Re: Combo box

    Hi...

    Sample DB

    MainTAB:

    PK_Number Name SUBname
    1 Noel John
    2 Krish Joy

    The pop up form will display all the fields above

    when user clicks on the PK_Number the relevant name and subname is to be displayed in the combo box.......

    combo box is mapped to pk_Number of maintab

  12. #12
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows XP Access 2002
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Sorry, I meant to attach your db or a sample of it so we can play with it.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Yes/No Checkbox Question
    By Richard in forum Access
    Replies: 3
    Last Post: 10-07-2009, 03:14 PM
  2. Horitontal Continous Form?
    By Lawrence in forum Forms
    Replies: 1
    Last Post: 07-21-2009, 03:06 PM
  3. Toggle checkbox
    By stewarta in forum Programming
    Replies: 9
    Last Post: 04-16-2009, 02:45 PM
  4. Checkbox
    By Rbtsmith in forum Access
    Replies: 2
    Last Post: 02-17-2009, 04:19 PM
  5. checkbox
    By Suresh in forum Forms
    Replies: 0
    Last Post: 12-19-2007, 01:30 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums