A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Populating Wrong Info



 
 
Thread Tools Display Modes
  #1  
Old December 6th, 2006, 05:45 PM posted to microsoft.public.access.forms
WMorsberger
external usenet poster
 
Posts: 123
Default 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  
Old December 6th, 2006, 06:36 PM posted to microsoft.public.access.forms
Jeff L
external usenet poster
 
Posts: 448
Default 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  
Old December 6th, 2006, 06:50 PM posted to microsoft.public.access.forms
WMorsberger
external usenet poster
 
Posts: 123
Default 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  
Old December 6th, 2006, 06:55 PM posted to microsoft.public.access.forms
WMorsberger
external usenet poster
 
Posts: 123
Default 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  
Old December 6th, 2006, 07:08 PM posted to microsoft.public.access.forms
WMorsberger
external usenet poster
 
Posts: 123
Default 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  
Old December 8th, 2006, 04:53 PM posted to microsoft.public.access.forms
Jeff L
external usenet poster
 
Posts: 448
Default 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  
Old December 12th, 2006, 11:43 AM posted to microsoft.public.access.forms
Welthey
external usenet poster
 
Posts: 52
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:17 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.