technocraze
01-30-2007, 09:27 AM
Hi OBP & community experts,
Another issue I am encountering is the error : Type mismatch error message. This occured at the Combo_After Update event.
To make it simple i am trying to display the corresponding values (StudentId, Name) into the textboxes from registration table. The values from the combo box is from a query. (Select distinct StudentId from Registration order by StudentId).
It mean that when I select the value from the combo box, the corresponding values matching that studentid will be displayed and i only want the studentid and name to be displayed in the bounded textboxes.
I will provide detailed information with explicit explanation so that the experts can look into the issues without much difficiluty and also prevent any misleading of information.
Design View
StudentId - unbounded combo box
Student - bounded textbox
Name - bounded textbox
subject - unbounded textbox
course - unbounded textbox
Table view
Registration
Serialcode - primary key (Autonumber)
StudentId - text
Name - text
course - text
subject -text
Query (sql view)
Select distinct StudentId from Registration
Code
Private Sub Combo1 AfterUpdate()
Dim rs as DAO.Recordsetset rs = Me.RecordSetClone
rs.FindFirst "[Serialcode] = " Str(Nz(Me![Combo1],0)) - Error
If not rs.EOF then Me.Bookmaek = rs.Bookmark
Message error: Type mismatch
Another issue I am encountering is the error : Type mismatch error message. This occured at the Combo_After Update event.
To make it simple i am trying to display the corresponding values (StudentId, Name) into the textboxes from registration table. The values from the combo box is from a query. (Select distinct StudentId from Registration order by StudentId).
It mean that when I select the value from the combo box, the corresponding values matching that studentid will be displayed and i only want the studentid and name to be displayed in the bounded textboxes.
I will provide detailed information with explicit explanation so that the experts can look into the issues without much difficiluty and also prevent any misleading of information.
Design View
StudentId - unbounded combo box
Student - bounded textbox
Name - bounded textbox
subject - unbounded textbox
course - unbounded textbox
Table view
Registration
Serialcode - primary key (Autonumber)
StudentId - text
Name - text
course - text
subject -text
Query (sql view)
Select distinct StudentId from Registration
Code
Private Sub Combo1 AfterUpdate()
Dim rs as DAO.Recordsetset rs = Me.RecordSetClone
rs.FindFirst "[Serialcode] = " Str(Nz(Me![Combo1],0)) - Error
If not rs.EOF then Me.Bookmaek = rs.Bookmark
Message error: Type mismatch