Minggu, 01 Januari 2017

Re: [MS_AccessPros] Invalid IF

 

David-


That looks fine as long as you actually have a control named txtTAPSort on the subform.  When you type Me. in the VB Editor, does intellisense list that value in the drop-down list?

John Viescas, Author
Effective SQL
SQL Queries for Mere Mortals 
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
(Paris, France)




On Jan 1, 2017, at 5:33 PM, david.pratt@outlook.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:



I have the following in the OnCurrent Event procedure of a subform, and it is throwing an error.  VBE tells me that "there is misuse or bang or dot operator or misuse of parenthesis.  I have spend at least an hour just trying to make this work.  I have tried multiple combinations of bangs, dots and parenthesis.  Can you help me please.

If IsNull(Me.txtTAPSort) Or Me.txtTAPSort = "" Then
        Me.txtTAPSort = Me.Parent.txtSampleSort
    End If

I am trying to set the value of a control in a subform to = the value of a control in a main form, ONLY if the value in the subform has not already been set.  I don't know if this is the correct Event to use and can't try it out because I can't get it to execute.

VBE hangs up on the first IF THEN line

I have almost exactly the same format for an IF statement in a different Event and it works perfectly.





__._,_.___

Posted by: John Viescas <johnv@msn.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Tidak ada komentar:

Posting Komentar