sereneabraham
Oct 14 2004, 05:08 PM
Hi,
Can anybody tell me if it is possible to bind an unbound textbox that is created on the fly to a field in the table?
Thanks & Regards,
Serene
Jack Cowley
Oct 14 2004, 05:19 PM
If you are using the CreateControl function to create a control then look in Access help and you will find that the ColumnName argument is where you add the name of the field the control is to be bound to.
hth,
Jack
sereneabraham
Oct 14 2004, 05:49 PM
Hi Jack,
Correct me if I am wrong but I am using the CreateControl method for the textbox as follows:
Set ctrlTextBox = CreateControl(strFrmName, acTextBox, , "", QuestionText, intDataX, intDataY) but when I go and see the ControlSource of textbox in form design view, I do not see QuestionText as the Control Source.
Thanks & Regards,
Serene
Jack Cowley
Oct 14 2004, 06:01 PM
Serene -
I wish I could say that you had QuestionText in the wrong place but you don't! There is no space or other characters in the field name in the table like Question Text is there? QuestionText is not mispelled in the table perchance? Your form is in design view when you run your code? I am just trying to think of all the reason why this is not working....
If none of the above apply then I am stumped... (Not an unusual situation...)
Jack
PS. Just had another thought... When you create the form did you set the RecordSource to the correct table? As you can see I am grasping at straws...
Edited by: Jack Cowley on Thu Oct 14 19:02:37 EDT 2004.
sereneabraham
Oct 14 2004, 06:16 PM
Hi Jack,
I had not set the form's recordsource but after I set it as below, I do not see any change in the recordsource for the textbox.
Set frm = CreateForm
frm.RecordSource= "tblQuestions"
Thanks & Regards,
Serene
Jack Cowley
Oct 14 2004, 06:22 PM
Serene -
You have used the code more in the last day than I have in the last 7 years so at this point I am afraid you are the expert. I haven't a clue as to what is going on. I'm sorry that I don't have a solution and if you don't get it working soon then start a new thread on this subject and I will not answer as maybe someone else has, like Anthony LaRiva!
Good luck with this!!!!
Jack
PS. After the form and controls are added and the form saved are the Record Source and Control Source still blank? See, still grasping at straws...
sereneabraham
Oct 15 2004, 01:04 PM
Hi Jack,
Thanks for your reply. I am sorry if I have bothered you with my posts. I will post a new thread about the same.
Thanks & Regards,
Serene
Jack Cowley
Oct 15 2004, 02:20 PM
Serene -
You NEVER bother me with your posts!!! I was just on my way out for the morning and I did not have an answer so I wanted you to start a new post so that other members would see it and maybe have a solution. When members see there is a lot of responses to a thread they think it is probably answered so do not look at it. I wanted you to start a new thread so that members would look at it and hopefully have the solution to your problem. I can assure you that I enjoy trying to help you and my intent was not for you to think that you were bothering me. I am here by choice to try and help nice people like you!
Jack
sereneabraham
Oct 15 2004, 06:40 PM
Hi,
Thanks so much Jack. So sorry if I misunderstood you.
Regards,
Serene
Jack Cowley
Oct 16 2004, 09:44 AM
Serene -
You are very welcome and no apology is necessary! Continued success with your project and I will lurk quietly and try to help when I can....
Jack
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.