Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Why sub-form (continuous form) doing this?

Posted on 2014-12-07
3
Medium Priority
?
157 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 2000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

782 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