Solved

Why sub-form (continuous form) doing this?

Posted on 2014-12-07
3
147 Views
Last Modified: 2014-12-07
For the life of me I can't figure out why a continuous form sub-form is doing this.  Here is a screen shot of it...

subform
And here is a screen shot of the actual data...

table data
And here is my afterupdate (and oncurrent code)...

Private Sub cboMedID_AfterUpdate()
    
    Me.txtMedGenericName = Me.cboMedID.Column(2)

End Sub

Open in new window


I've done this countless times before but am perplexed!
0
Comment
Question by:SteveL13
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
pdebaets earned 500 total points
ID: 40485609
Try setting the control source of txtMedGenericName to

=cboMedID.Column(2)

... and remove your after update and on current code that sets the value of txtMedGenericName.
0
 

Author Comment

by:SteveL13
ID: 40485616
Perfect!  But I can't see why my way wasn't working.  It has in the past.  I must be missing something.
0
 
LVL 12

Expert Comment

by:pdebaets
ID: 40485628
Well, if you are setting the value of an unbound control on a continuous form, then all of the continuous form fields in that column get the value. When you bind the control, then it looks to the record related to the continuous form row. That's how I see it. Maybe others will have a better explanation of what is going on.
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question