Results 1 to 5 of 5
  1. #1
    angie is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Dec 2013
    Posts
    232

    info from one field copy to another field in the same form

    I have the followingcode which works great, but I need it to work on a different field that iscalled “misc” and the information could be anything that is typed so what isever entered in this field I would like it to be placed in the proposal field.
    Thank you Angie

    Private SubApcoAir_AfterUpdate()
    IfMe.ApcoAir = True Then
    Me.ApcoAirPrice= "850"
    Me.Proposal= Me.Proposal & vbCrLf & "Install Apco Air"
    Else
    Me.ApcoAirPrice= Null
    Me.Proposal= Replace(Me.Proposal, vbCrLf & "Install Apco Air", "")


    End If
    Me.Refresh

    End Sub

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    I don't understand the issue. If you want to use a different field then write code to reflect that. You need code behind 'misc' in its AfterUpdate event?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    angie is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Dec 2013
    Posts
    232
    Quote Originally Posted by June7 View Post
    I don't understand the issue. If you want to use a different field then write code to reflect that. You need code behind 'misc' in its AfterUpdate event?
    Where I have “ install apco air” I need it to be what is typed into the “misc” field. If I replace it with “misc” it types misc I need it to put what is in the misc field

  4. #4
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    If I understand you correctly then

    Code:
    Private SubApcoAir_AfterUpdate()
    IfMe.ApcoAir = True Then
    Me.ApcoAirPrice= "850"
    Me.Proposal= Me.Proposal & vbCrLf & Me.Misc
    Else
    Me.ApcoAirPrice= Null
    Me.Proposal= Replace(Me.Proposal, vbCrLf & Me.Misc, "")
    End If
    Me.Refresh
    
    End Sub
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  5. #5
    angie is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Dec 2013
    Posts
    232
    Quote Originally Posted by ridders52 View Post
    If I understand you correctly then

    Code:
    Private SubApcoAir_AfterUpdate()
    IfMe.ApcoAir = True Then
    Me.ApcoAirPrice= "850"
    Me.Proposal= Me.Proposal & vbCrLf & Me.Misc
    Else
    Me.ApcoAirPrice= Null
    Me.Proposal= Replace(Me.Proposal, vbCrLf & Me.Misc, "")
    End If
    Me.Refresh
    
    End Sub
    that works great. Thank you so much.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 03-10-2013, 01:03 AM
  2. Replies: 3
    Last Post: 01-17-2012, 01:04 PM
  3. Replies: 3
    Last Post: 05-23-2011, 07:29 AM
  4. Replies: 4
    Last Post: 02-08-2011, 08:43 AM
  5. copy info in subform as well as main form
    By Coolpapabell in forum Forms
    Replies: 0
    Last Post: 09-30-2009, 10:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums