Update Form & Combobox Issues

MNM

Registered User.
Local time
Today, 15:26
Joined
Mar 3, 2014
Messages
61
Greetings,
I'm having an issue with two similar forms which change the status of Instructors and Students from 'Atcive' to 'Inactive' with a checkbox, See attached Form Issue ZIP file.
Whenever a student's or Instructor's status is changed, the name is written over with the table's ID number.
I've tried several times to modify both the form and combobox's data tab properties, but I can't seem to get it right.
Any help is appreciated.
Mark
 

Attachments

I've extracted the code from one of the forms...

Could you explain how it relates to your question?

Code:
Option Compare Database

Private Sub BTN_CLS_Click()
On Error GoTo Err_BTN_CLS_Click


    If Me.Dirty Then Me.Dirty = False
    DoCmd.CLOSE

Exit_BTN_CLS_Click:
    Exit Sub

Err_BTN_CLS_Click:
    MsgBox Err.Description
    Resume Exit_BTN_CLS_Click
    
End Sub

Private Sub InstructorName_Enter()
 InstructorName.Dropdown
End Sub
 
I've extracted the code from one of the forms...

Could you explain how it relates to your question?

Code:
Option Compare Database

Private Sub BTN_CLS_Click()
On Error GoTo Err_BTN_CLS_Click


    If Me.Dirty Then Me.Dirty = False
    DoCmd.CLOSE

Exit_BTN_CLS_Click:
    Exit Sub

Err_BTN_CLS_Click:
    MsgBox Err.Description
    Resume Exit_BTN_CLS_Click
    
End Sub

Private Sub InstructorName_Enter()
 InstructorName.Dropdown
End Sub

The button 'CLOSE' buttons are from the Button Wizard, which automatically added the code. Although, I may have added the Me.Dirty line; I need to experiment.

I just did and the wizard adds that code.

Do you think that line is the culprit?
MNM
 

CJ_London,
After many cross posts, no one until now has pointed this out.
I will endeavor to do this. Both Access World Forums and UtterAccess are both invaluable resources for me. I recently returned to AccessFourms.net after a very long hiatus.
I will properly cross post to the original when I get to work.
Mark
 
I've got an issue with the way you have presented your question. Basically you have posted some meaningless code, and presented it as your attempt at solving the problem. There's nothing concrete for me to work with, I can't guess from the code what you were trying to do because it's just meaningless nonsense. So you need to explain clearly what you want to do.

On the other hand once I get past my irritation, I suspect all you were trying to do was provide a starting point for anyone volunteering help.

I suggest you have another go at explaining what you want your form to do when you select Active or inactive status.
 
Last edited:
Greetings all,
tina t on utteraccess http://www.utteraccess.com/forum/index.php?showuser=178721 said it clear enough for me to understand.
Make the combo box unbound, and then add code in the After Update event to point to the record to be modified.
After further digging, I found some references to the Combobox wizard to point to a specific record.
I created a new form and set its source to one of the tables. Made a combbox with the wizard and got the code
Code:
    ' Find the record that matches the control.
    Dim rs As Object

    Set rs = Me.Recordset.Clone
    rs.FindFirst "[Student_ID] = " & Str(Nz(Me![Combobox_Name], 0))
    If Not rs.EOF Then Me.Bookmark = rs.Bookmark
After renaming the unbound comboboxes, the code was placed in the proper place.
Now, both forms work as expected.

From this point on, I will try to be as possible, and if I cross post, will clearly indicate with the appropriate links.
With gratitude,
Mark
 
After many cross posts, no one until now has pointed this out.
It's not always noticed, but is noted when it is.
 

Users who are viewing this thread

Back
Top Bottom