New Form Same Record - Button no Worky

Jester1147

Registered User.
Local time
Today, 17:56
Joined
Mar 27, 2009
Messages
13
OK...

now im fairly new to Access (know enough to cause some trouble... basic BASIC stuff... etc) but i know squat about VB.

I know that most stuff can be accomplished by wizards as well.

My issue

Creating a program to track items issued (in this case, keys for a building). There are forms required to fill out every time we issue anything to an individual. I was able to create the automated form as well a form to input the information for internal record purposes. I went through the wizard to create a button in the tracking form to automatically pull up the automated form with the same current record. The problem is, every time it will only pull up the first record.

Where do i begin to fix this issue? What information does any of you need to get me to where i need to be!

Thanks
Jester
 
What code are you using behind this magical button? It's hard to trouble shoot something we can't see! :D
 
Hey Coyote... its not that i want to open the same record the next time the form is opened... i want to open the current record on one form... in another seperate form.

missinglinq... the "code" used is the macro set up by the wizard. As i stated... i dont quite know what all information you will need.. but let me know and i will get it to you.

Action
OpenForm

Arguements
1297, Form, , "[Issued To: Name]=" & "'" & [Issued To: Name] & "'", , Normal

and all of that is greek to me
 
Hoping that in your form you have a key field like "IssueID" then post this code on your button on click event

Code:
Private Sub cmdYourButtonMame_Click()
    On Error GoTo Err_cmdYourButtonMame_Click

    Dim stDocName As String
    Dim stLinkCriteria As String  

    stDocName = "The Name of the form the button is opening"    
    stLinkCriteria = "The name of the Key field on the form you are       opening=" & Me.Name of the key Id of the current form where the button is

        DoCmd.openForm stDocName, , , stLinkCriteria

Exit_cmdYourButtonMame_Click:
    Exit Sub

Err_cmdYourButtonMame_Click:
    MsgBox Err.Description
    Resume Exit_cmdYourButtonMame_Click
End Sub

Cheers
 

Users who are viewing this thread

Back
Top Bottom