If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Assigning values from 1 combo box to 2 textboxes.
Hello,
I am not sure if this is possible. I have 2 textboxes which the user has been instructed to use for a search. I also have a combo box. The following is the properties section of the combo box. SELECT [qryQOE-ManualUpdate].student_studentreference, [qryQOE-ManualUpdate]. [student-surname], [qryQOE-ManualUpdate].student_forenames, Trim( [student_forenames]) & " " & Trim([student-surname]) AS Student FROM [qryQOE- ManualUpdate] ORDER BY [qryQOE-ManualUpdate].[student-surname]; I have put this in the AfterUpdate event of the combo box. Private Sub Student_AfterUpdate() Me.Student.Column(1) = Me.txtSurname Me.Student.Column(2) = Me.txtForenames Me.Student.Requery End Sub Every time I run the form, I get a runtime message saying "Run-time error '424' - Object required". I am not sure if this does not work becauseit is the same 2 text boxes used in the search that has to be filled. Can anyone please advise/help? -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200605/1 |
#2
|
|||
|
|||
Assigning values from 1 combo box to 2 textboxes.
You've got your assignment statements backwards:
Me.txtSurname = Me.Student.Column(1) Me.txtForenames = Me.Student.Column(2) -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "sike11 via AccessMonster.com" u21678@uwe wrote in message news:6009eac9ca9cd@uwe... Hello, I am not sure if this is possible. I have 2 textboxes which the user has been instructed to use for a search. I also have a combo box. The following is the properties section of the combo box. SELECT [qryQOE-ManualUpdate].student_studentreference, [qryQOE-ManualUpdate]. [student-surname], [qryQOE-ManualUpdate].student_forenames, Trim( [student_forenames]) & " " & Trim([student-surname]) AS Student FROM [qryQOE- ManualUpdate] ORDER BY [qryQOE-ManualUpdate].[student-surname]; I have put this in the AfterUpdate event of the combo box. Private Sub Student_AfterUpdate() Me.Student.Column(1) = Me.txtSurname Me.Student.Column(2) = Me.txtForenames Me.Student.Requery End Sub Every time I run the form, I get a runtime message saying "Run-time error '424' - Object required". I am not sure if this does not work becauseit is the same 2 text boxes used in the search that has to be filled. Can anyone please advise/help? -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200605/1 |
#3
|
|||
|
|||
Assigning values from 1 combo box to 2 textboxes.
Thank you. Worked like a charm!! Could you help me further? Once I chose a
name from the combo box, is there any way for me to be able to chase another name using the same criteria? Regards, Mary. Douglas J Steele wrote: You've got your assignment statements backwards: Me.txtSurname = Me.Student.Column(1) Me.txtForenames = Me.Student.Column(2) Hello, [quoted text clipped - 26 lines] Can anyone please advise/help? -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200605/1 |
#4
|
|||
|
|||
Assigning values from 1 combo box to 2 textboxes.
Sorry: I don't understand your question.
Can you elaborate? -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "sike11 via AccessMonster.com" u21678@uwe wrote in message news:600b800f31b7f@uwe... Thank you. Worked like a charm!! Could you help me further? Once I chose a name from the combo box, is there any way for me to be able to chase another name using the same criteria? Regards, Mary. Douglas J Steele wrote: You've got your assignment statements backwards: Me.txtSurname = Me.Student.Column(1) Me.txtForenames = Me.Student.Column(2) Hello, [quoted text clipped - 26 lines] Can anyone please advise/help? -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200605/1 |
#5
|
|||
|
|||
Assigning values from 1 combo box to 2 textboxes.
Sorry,
What I mean is, when I went back to the combo box to choose another name in the list, it did not allow me to do so. Is there any way for me to do that using the same criteria I initially inserted in the text box? Thanks in advance. Douglas J Steele wrote: Sorry: I don't understand your question. Can you elaborate? Thank you. Worked like a charm!! Could you help me further? Once I chose a name from the combo box, is there any way for me to be able to chase another [quoted text clipped - 14 lines] Can anyone please advise/help? -- Message posted via http://www.accessmonster.com |
#6
|
|||
|
|||
Assigning values from 1 combo box to 2 textboxes.
You mean you want to be able to choose more than one name? Combo boxes are
simply single-select. To get multi-select capabilities, you need to use a list box. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "sike11 via AccessMonster.com" u21678@uwe wrote in message news:60148cd8535d5@uwe... Sorry, What I mean is, when I went back to the combo box to choose another name in the list, it did not allow me to do so. Is there any way for me to do that using the same criteria I initially inserted in the text box? Thanks in advance. Douglas J Steele wrote: Sorry: I don't understand your question. Can you elaborate? Thank you. Worked like a charm!! Could you help me further? Once I chose a name from the combo box, is there any way for me to be able to chase another [quoted text clipped - 14 lines] Can anyone please advise/help? -- Message posted via http://www.accessmonster.com |
#7
|
|||
|
|||
Assigning values from 1 combo box to 2 textboxes.
Thank you.
Is there any way to get the form to refresh so that I can input another search criteria? I tried "Me.requerry" but it does not seem to refresh the form and leaves the value of the old result in the combo box. Any advise greatly appreciated. Rgerads, Douglas J Steele wrote: You mean you want to be able to choose more than one name? Combo boxes are simply single-select. To get multi-select capabilities, you need to use a list box. Sorry, [quoted text clipped - 13 lines] Can anyone please advise/help? -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200605/1 |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
You cancelled the previous action error on certain combo box selec | Eamonn | Using Forms | 8 | March 11th, 2006 04:51 PM |
Hidden Power of the Combo Box | JethroUK© | New Users | 2 | October 24th, 2005 09:18 AM |
Refreshing a combo box with values entered in another tabbed subfo | Ed880 | Using Forms | 0 | October 21st, 2005 03:13 PM |
Storing values when using one combo box based on another? | Wolf | General Discussion | 1 | June 13th, 2005 02:43 PM |
combo box values | DW via AccessMonster.com | Using Forms | 1 | May 11th, 2005 07:42 AM |