Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    Join Date
    Nov 2005
    Location
    Sweden
    Posts
    29

    Arrow Unanswered: Got one last problem

    Hey guess what....I'm back LOL.
    I've got one last problem, it has to do with linked forms.
    The problem is that when I open the linked form with the button from my first form I try to get one value from the first form togo into the 2nd one.
    It works as long as I dont do anything on the 2nd form. If i do and go back to my first form and change the post to another one (which also changes the value I'm trying to copy) and try to open my 2nd form again the value stays the same as it did before. What do I do to get rid of this problem?
    The Man
    The Myth
    The Legend

  2. #2
    Join Date
    Nov 2005
    Location
    Sweden
    Posts
    29
    Was that description abit fuzzy or something?
    If so please ask me about it cause I really need help soon with this problem.
    The Man
    The Myth
    The Legend

  3. #3
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Perhaps re-pull the value ...
    Back to Access ... ADO is not the way to go for speed ...

  4. #4
    Join Date
    Nov 2005
    Location
    Sweden
    Posts
    29
    Quote Originally Posted by M Owen
    Perhaps re-pull the value ...
    Not really sure what you mean.
    The value gets assigned by setting the defalut value to (form1.orgnr)(by setting it up in the properties window of the textbox that contains shud contain the value) sort of.
    But it still opens up the first post in the 2nd form instead of the one related to the post in the first form.

    Is there an easy way to correct the problem?
    Last edited by ionizer; 01-10-06 at 11:16.
    The Man
    The Myth
    The Legend

  5. #5
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    the big problem is finding an event - and that's easy for you since you have your button _Click()

    drop the default and have a go with something like

    private sub myButton_Click()
    docmd.openform "myOtherForm"
    forms!myOtherForm.thatTextBox = Me.thisTextBox

    you may prefer (i don't!) openargs ...see help.

    izy
    currently using SS 2008R2

  6. #6
    Join Date
    Nov 2005
    Location
    Sweden
    Posts
    29
    Thanks.
    I'll have a go with that at home
    The Man
    The Myth
    The Legend

  7. #7
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926

    open arguments

    Question for izyrider:

    By openargs, I take it you mean dim a variable after the open explicit? If so, I'm curious why you don't like them. I don't like dimensioning a variable after the open explicit as I think they create overhead and can cause problems in a Terminal Server environment but I wasn't sure what you meant and could use some more info for argueing against them.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  8. #8
    Join Date
    Jan 2006
    Posts
    14
    Maybe I don't understand, but won't a Refresh command button work to make it show on the other linked form without having to close and re-open it?

  9. #9
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926

    Refresh

    Refresh, Repaint, Requery - one might work.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  10. #10
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004

    Talking

    Quote Originally Posted by adaviskheslc
    Maybe I don't understand, but won't a Refresh command button work to make it show on the other linked form without having to close and re-open it?
    Just ReQuery Refresh after you input your data in the field on the form. That be in the AfterUpdate event. That's what I've done before. No need to make another button for that.

    BUD

  11. #11
    Join Date
    Nov 2005
    Location
    Sweden
    Posts
    29
    Quote Originally Posted by Bud
    Just ReQuery Refresh after you input your data in the field on the form. That be in the AfterUpdate event. That's what I've done before. No need to make another button for that.

    BUD
    That sounds alot better. I dont really want to add another button just to make the linked form update....seems abit daft.
    Oh btw how do I make a linked form open the last post instead of the first?
    The Man
    The Myth
    The Legend

  12. #12
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004

    Talking

    Quote Originally Posted by ionizer
    That sounds alot better. I dont really want to add another button just to make the linked form update....seems abit daft.
    Oh btw how do I make a linked form open the last post instead of the first?
    Place this on the Forms "OnOpen" event. Then when it first opens it will go to the Last Form, Post or whatever you call it. Play with that a bit and have a nice one,
    BUD


    Code:
    Private Sub Form_Open(Cancel As Integer)
    
        DoCmd.GoToRecord , , acLast
        
    End Sub

  13. #13
    Join Date
    Nov 2005
    Location
    Sweden
    Posts
    29
    Quote Originally Posted by Bud
    Place this on the Forms "OnOpen" event. Then when it first opens it will go to the Last Form, Post or whatever you call it. Play with that a bit and have a nice one,
    BUD


    Code:
    Private Sub Form_Open(Cancel As Integer)
    
        DoCmd.GoToRecord , , acLast
        
    End Sub
    Thank you, thank you, thank you. That solved everything and it was easy to.
    You da man!
    The Man
    The Myth
    The Legend

  14. #14
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004

    Talking

    Quote Originally Posted by ionizer
    Thank you, thank you, thank you. That solved everything and it was easy to.
    You da man!
    Anytime, just glad to be of some help.
    The Ionizer....sounds like a catchy movie title...hahaha.

    have a nice one,
    BUD

  15. #15
    Join Date
    Nov 2005
    Location
    Sweden
    Posts
    29
    Quote Originally Posted by Bud
    Anytime, just glad to be of some help.
    The Ionizer....sounds like a catchy movie title...hahaha.

    have a nice one,
    BUD
    LOL I guess so.

    Um I still have a problem with getting the right value in the field though. It goes to the last form thats been made. But I need it to make a new page when I enter a new value. (If I have a value that does'nt allready have a page in the form I need it to make a new page). Is that hard to do?
    The Man
    The Myth
    The Legend

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •