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
|
|||
|
|||
Populating Wrong Info
I'm going to start with my question and I think I have put everything in here
that someone may need to help me out. When I choose "Corr" from the first drop down box, I get the "Corr" list of MIS Numbers, but the report name that populates in the "RptName" box is from the "Queue" list. I know that it's probably something really small, I have looked at everything and everything looks fine too me, I think I am just looking over something. Any help would be great. I have 3 fields on my form that are all connected to one another. Field one is a drop down box that you can choose either "Corr" or "Queue. This is the code that I have in the after update Private Sub TypeOfWork_AfterUpdate() On Error Resume Next Select Case TypeOfWork.Value Case "Corr" cboMISNumber.RowSource = "tblCorrWork" Case "Queue" cboMISNumber.RowSource = "tblQueueWork" End Select End Sub Based on what you choose in that box it then populates the next drop down box "MisNumber" Here is the code that I have in the after update Private Sub cboMISNumber_AfterUpdate() Me.txtRptName = DLookup("[RptName]", "[tblCorrWork]", "[MISNumber]=" & Me.cboMISNumber) Me.txtRptName = DLookup("[RptName]", "[tblQueueWork]", "[MISNumber]=" & Me.cboMISNumber) End Sub The last box is the RptName this is populated based on what you choose in the MISNumber. |
#2
|
|||
|
|||
Populating Wrong Info
Your problem is in cboMISNumber_AfterUpdate(). You are running both
DLookup statements no matter what. You have no logic to pick the correct one. The reason you are getting the name from the Queue list is because that is the last DLookup you run. Hope that helps! WMorsberger wrote: I'm going to start with my question and I think I have put everything in here that someone may need to help me out. When I choose "Corr" from the first drop down box, I get the "Corr" list of MIS Numbers, but the report name that populates in the "RptName" box is from the "Queue" list. I know that it's probably something really small, I have looked at everything and everything looks fine too me, I think I am just looking over something. Any help would be great. I have 3 fields on my form that are all connected to one another. Field one is a drop down box that you can choose either "Corr" or "Queue. This is the code that I have in the after update Private Sub TypeOfWork_AfterUpdate() On Error Resume Next Select Case TypeOfWork.Value Case "Corr" cboMISNumber.RowSource = "tblCorrWork" Case "Queue" cboMISNumber.RowSource = "tblQueueWork" End Select End Sub Based on what you choose in that box it then populates the next drop down box "MisNumber" Here is the code that I have in the after update Private Sub cboMISNumber_AfterUpdate() Me.txtRptName = DLookup("[RptName]", "[tblCorrWork]", "[MISNumber]=" & Me.cboMISNumber) Me.txtRptName = DLookup("[RptName]", "[tblQueueWork]", "[MISNumber]=" & Me.cboMISNumber) End Sub The last box is the RptName this is populated based on what you choose in the MISNumber. |
#3
|
|||
|
|||
Populating Wrong Info
Is there something that I can do to correct it? I have it running on other
form and it is set up the same way and it seems to work fine on that one. "Jeff L" wrote: Your problem is in cboMISNumber_AfterUpdate(). You are running both DLookup statements no matter what. You have no logic to pick the correct one. The reason you are getting the name from the Queue list is because that is the last DLookup you run. Hope that helps! WMorsberger wrote: I'm going to start with my question and I think I have put everything in here that someone may need to help me out. When I choose "Corr" from the first drop down box, I get the "Corr" list of MIS Numbers, but the report name that populates in the "RptName" box is from the "Queue" list. I know that it's probably something really small, I have looked at everything and everything looks fine too me, I think I am just looking over something. Any help would be great. I have 3 fields on my form that are all connected to one another. Field one is a drop down box that you can choose either "Corr" or "Queue. This is the code that I have in the after update Private Sub TypeOfWork_AfterUpdate() On Error Resume Next Select Case TypeOfWork.Value Case "Corr" cboMISNumber.RowSource = "tblCorrWork" Case "Queue" cboMISNumber.RowSource = "tblQueueWork" End Select End Sub Based on what you choose in that box it then populates the next drop down box "MisNumber" Here is the code that I have in the after update Private Sub cboMISNumber_AfterUpdate() Me.txtRptName = DLookup("[RptName]", "[tblCorrWork]", "[MISNumber]=" & Me.cboMISNumber) Me.txtRptName = DLookup("[RptName]", "[tblQueueWork]", "[MISNumber]=" & Me.cboMISNumber) End Sub The last box is the RptName this is populated based on what you choose in the MISNumber. |
#4
|
|||
|
|||
Populating Wrong Info
Nevermind - I think I know how to correct it - I don't have the same thing
running on another form "Jeff L" wrote: Your problem is in cboMISNumber_AfterUpdate(). You are running both DLookup statements no matter what. You have no logic to pick the correct one. The reason you are getting the name from the Queue list is because that is the last DLookup you run. Hope that helps! WMorsberger wrote: I'm going to start with my question and I think I have put everything in here that someone may need to help me out. When I choose "Corr" from the first drop down box, I get the "Corr" list of MIS Numbers, but the report name that populates in the "RptName" box is from the "Queue" list. I know that it's probably something really small, I have looked at everything and everything looks fine too me, I think I am just looking over something. Any help would be great. I have 3 fields on my form that are all connected to one another. Field one is a drop down box that you can choose either "Corr" or "Queue. This is the code that I have in the after update Private Sub TypeOfWork_AfterUpdate() On Error Resume Next Select Case TypeOfWork.Value Case "Corr" cboMISNumber.RowSource = "tblCorrWork" Case "Queue" cboMISNumber.RowSource = "tblQueueWork" End Select End Sub Based on what you choose in that box it then populates the next drop down box "MisNumber" Here is the code that I have in the after update Private Sub cboMISNumber_AfterUpdate() Me.txtRptName = DLookup("[RptName]", "[tblCorrWork]", "[MISNumber]=" & Me.cboMISNumber) Me.txtRptName = DLookup("[RptName]", "[tblQueueWork]", "[MISNumber]=" & Me.cboMISNumber) End Sub The last box is the RptName this is populated based on what you choose in the MISNumber. |
#5
|
|||
|
|||
Populating Wrong Info
Ok so I have been looking at this and when using the cascading list - how do
I get the "RptName" to populate with the corresponding information from the MISNumber field? "Jeff L" wrote: Your problem is in cboMISNumber_AfterUpdate(). You are running both DLookup statements no matter what. You have no logic to pick the correct one. The reason you are getting the name from the Queue list is because that is the last DLookup you run. Hope that helps! WMorsberger wrote: I'm going to start with my question and I think I have put everything in here that someone may need to help me out. When I choose "Corr" from the first drop down box, I get the "Corr" list of MIS Numbers, but the report name that populates in the "RptName" box is from the "Queue" list. I know that it's probably something really small, I have looked at everything and everything looks fine too me, I think I am just looking over something. Any help would be great. I have 3 fields on my form that are all connected to one another. Field one is a drop down box that you can choose either "Corr" or "Queue. This is the code that I have in the after update Private Sub TypeOfWork_AfterUpdate() On Error Resume Next Select Case TypeOfWork.Value Case "Corr" cboMISNumber.RowSource = "tblCorrWork" Case "Queue" cboMISNumber.RowSource = "tblQueueWork" End Select End Sub Based on what you choose in that box it then populates the next drop down box "MisNumber" Here is the code that I have in the after update Private Sub cboMISNumber_AfterUpdate() Me.txtRptName = DLookup("[RptName]", "[tblCorrWork]", "[MISNumber]=" & Me.cboMISNumber) Me.txtRptName = DLookup("[RptName]", "[tblQueueWork]", "[MISNumber]=" & Me.cboMISNumber) End Sub The last box is the RptName this is populated based on what you choose in the MISNumber. |
#6
|
|||
|
|||
Populating Wrong Info
Use the same logic as you did in TypeOfWork_AfterUpdate().
Select Case TypeOfWork.Value Case "Corr" Me.txtRptName = DLookup("[RptName]", "[tblCorrWork]", "[MISNumber]=" & Me.cboMISNumber) Case "Queue" Me.txtRptName = DLookup("[RptName]", "[tblQueueWork]", "[MISNumber]=" & Me.cboMISNumber) End Select Hope that helps! WMorsberger wrote: Ok so I have been looking at this and when using the cascading list - how do I get the "RptName" to populate with the corresponding information from the MISNumber field? "Jeff L" wrote: Your problem is in cboMISNumber_AfterUpdate(). You are running both DLookup statements no matter what. You have no logic to pick the correct one. The reason you are getting the name from the Queue list is because that is the last DLookup you run. Hope that helps! WMorsberger wrote: I'm going to start with my question and I think I have put everything in here that someone may need to help me out. When I choose "Corr" from the first drop down box, I get the "Corr" list of MIS Numbers, but the report name that populates in the "RptName" box is from the "Queue" list. I know that it's probably something really small, I have looked at everything and everything looks fine too me, I think I am just looking over something. Any help would be great. I have 3 fields on my form that are all connected to one another. Field one is a drop down box that you can choose either "Corr" or "Queue. This is the code that I have in the after update Private Sub TypeOfWork_AfterUpdate() On Error Resume Next Select Case TypeOfWork.Value Case "Corr" cboMISNumber.RowSource = "tblCorrWork" Case "Queue" cboMISNumber.RowSource = "tblQueueWork" End Select End Sub Based on what you choose in that box it then populates the next drop down box "MisNumber" Here is the code that I have in the after update Private Sub cboMISNumber_AfterUpdate() Me.txtRptName = DLookup("[RptName]", "[tblCorrWork]", "[MISNumber]=" & Me.cboMISNumber) Me.txtRptName = DLookup("[RptName]", "[tblQueueWork]", "[MISNumber]=" & Me.cboMISNumber) End Sub The last box is the RptName this is populated based on what you choose in the MISNumber. |
#7
|
|||
|
|||
Populating Wrong Info
That worked - Thank you so much for you time and help.
"Jeff L" wrote: Use the same logic as you did in TypeOfWork_AfterUpdate(). Select Case TypeOfWork.Value Case "Corr" Me.txtRptName = DLookup("[RptName]", "[tblCorrWork]", "[MISNumber]=" & Me.cboMISNumber) Case "Queue" Me.txtRptName = DLookup("[RptName]", "[tblQueueWork]", "[MISNumber]=" & Me.cboMISNumber) End Select Hope that helps! WMorsberger wrote: Ok so I have been looking at this and when using the cascading list - how do I get the "RptName" to populate with the corresponding information from the MISNumber field? "Jeff L" wrote: Your problem is in cboMISNumber_AfterUpdate(). You are running both DLookup statements no matter what. You have no logic to pick the correct one. The reason you are getting the name from the Queue list is because that is the last DLookup you run. Hope that helps! WMorsberger wrote: I'm going to start with my question and I think I have put everything in here that someone may need to help me out. When I choose "Corr" from the first drop down box, I get the "Corr" list of MIS Numbers, but the report name that populates in the "RptName" box is from the "Queue" list. I know that it's probably something really small, I have looked at everything and everything looks fine too me, I think I am just looking over something. Any help would be great. I have 3 fields on my form that are all connected to one another. Field one is a drop down box that you can choose either "Corr" or "Queue. This is the code that I have in the after update Private Sub TypeOfWork_AfterUpdate() On Error Resume Next Select Case TypeOfWork.Value Case "Corr" cboMISNumber.RowSource = "tblCorrWork" Case "Queue" cboMISNumber.RowSource = "tblQueueWork" End Select End Sub Based on what you choose in that box it then populates the next drop down box "MisNumber" Here is the code that I have in the after update Private Sub cboMISNumber_AfterUpdate() Me.txtRptName = DLookup("[RptName]", "[tblCorrWork]", "[MISNumber]=" & Me.cboMISNumber) Me.txtRptName = DLookup("[RptName]", "[tblQueueWork]", "[MISNumber]=" & Me.cboMISNumber) End Sub The last box is the RptName this is populated based on what you choose in the MISNumber. |
Thread Tools | |
Display Modes | |
|
|