Textbox not populating

warriorkid1

Registered User.
Local time
Today, 10:25
Joined
Jul 31, 2014
Messages
11
Hello, I am new to access but I am creating a form on access 2010 for a Pass Request. On the form so far I have two cascading combo boxes that work great so far. The problem is that once a name is selected from the second combo box(cboFullNames) I want a textbox underneath to populate(txtOrg). I have tried using requery and refresh but it never works. The only thing that seems to pull up the information is pressing the refresh button. Any help would be appreciated.
 
What method are you trying to use to populate the text box. Are you using an expression in its Control Source property, or perhaps some code in the After Update event of the combo box. Would be easier to help if we knew more about your approach and if will could see any code you are using.
 
So far I've been using me.txtOrg.requery in the after update event of the combo box but that has not been working
 
So is txtOrg bound to a field in the underlying table/query.
 
I assume from its name (cboFullNames) that it it shows someones First name and Surname joined together. Is that right.
 
I have the two combo boxes working already. My problem is that I have a bunch of textboxes underneath that I want to populate when the second combo box is selected. As of right now, if I make a selection on the second combo box the textboxes underneath don't populate until I hit refresh on the Home ribbon.
 
correct, it is bound to qtblInfo
Well in IMHO it should not be bound because it is essentially a calculated control and as such would be calculated when and wherever it is required. You could use an expression as its Control Source, something like:
= Trim([NameOfYourComboControl].Column(0) & " " & [NameOfYourComboControl].Column(1))
This means the value of the first column in the combo and then the value of the second column with a space in between. The numbers in ()s represent the column required. This index is zero based so the first column is (0), the second is (1) etc.
Try that and post back with the result.
 
Hey Bob, I am having essentially the same issue in Access 10' only mine is based on an expression. The form itself is a split form and has the following code:
Code:
Private Sub Form_Open(Cancel As Integer)
Auto_Header0.FontName = "Impact"
End Sub
The funny thing to me is that it was working fine previously to me changing the subform it contains and I only added two command buttons. Any thoughts on why this could be happening? I'd greatly appreciate it!
 
@Samantha
Sorry, I'm a bit confused. Can you explain what you are trying to do and the problem you are having.
 
Thanks for your reply Bob, I have a text field that is a expression combining two pieces of data. The previous code is just what is behind the form itself and should have nothing to do with the issue (only for info purposes). The field in question is set by the expression builder as...
Control Source: =[tblProposals]![Company]+Nz(" - "+[tblProposals]![EngineerArchitectCompany])
For some reason all of a sudden it appears blank until you click in the field, the data is there. I recently changed the subform that is included in the split form by adding two command buttons that sends the information into outlook as an appointment. I wouldn't think that would effect it?
 
Thanks for your time Bob, I did rebuild it by changing the query to include the field I wanted as an expression instead of completing it in the form itself. No idea why it stopped working. :)
 
Glad you have it working now :) Good luck with your project.
 

Users who are viewing this thread

Back
Top Bottom