Home
Forums
New posts
Search forums
Articles
Latest reviews
Search resources
Members
Current visitors
Newsgroups
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Home
Forums
Newsgroups
Microsoft Access
Microsoft Access Form Coding
Default value of combo box based on another that uses DLookUp - continued
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Bob Wickham, post: 10911697"] Ken Snell was kind enough to offer me some assistance here (repeated below) but he has had leave town for a week and I'm hoping another knowledgable person can help me. The sql of the query in the DLookup is: SELECT tblPlanWriter.Plan_Writer, tblPlan.Client, Max(tblPlan.Date_Received) AS MaxOfDate_Received FROM tblPlanWriter INNER JOIN tblPlan ON tblPlanWriter.Plan_Writer_ID = tblPlan.Assigned_To_PlanWriter GROUP BY tblPlanWriter.Plan_Writer, tblPlan.Client ORDER BY Max(tblPlan.Date_Received) DESC; I think my problem is mis-matched data types, string and number, although no error message pops up to say so. The combo box I want to have show the same value as the other just remains blank. ******************************************************* Thankyou Ken, I now have the following in the AfterUpdate event of the first combo Private Sub Default_Planwriter_AfterUpdate() Me.PlanWriter.Value = _ DLookup("Plan_Writer", "qryDefault_Planwriter", "[Client]=" & _ Me.Default_Planwriter.Value) End Sub The control source of the first combo (Default_Planwriter) remains =DLookUp("Plan_Writer","qryDefault_Planwriter","[Client]=Form![Client]") which is a String I have deleted the Control source of the second combo (PlanWriter) so now it is unbound but its Row Source remains SELECT tblPlanWriter.Plan_Writer_ID, tblPlanWriter.Plan_Writer FROM tblPlanWriter; The primary key here, Plan_Writer_ID is a AutoNumber so does that mean this sql is returning a number. If so, do I need to convert my text string to a number or maybe, my number to a string. Bob [/QUOTE]
Verification
Post reply
Home
Forums
Newsgroups
Microsoft Access
Microsoft Access Form Coding
Default value of combo box based on another that uses DLookUp - continued
Top