Displaying a variable on a form?

PD75

New member
Local time
Yesterday, 16:22
Joined
Aug 28, 2013
Messages
4
Hi all

Hope someone can help with this? I am very new to MS Access and VBA so as basic an explanation as possible would be much appreicated.

I have been given a form that you pass a paramter into and on the basis of this it performs certain amendemnts to the particular data AND also runs 2 stored procedures on this data. I need to get the data to display on the form so that the user can visually varify if it is the correct data and then they will on click to execute the amendments and stored procedures.

I cannot get the data to display on the screen? I have tried to create a variable in the VBA code to store the data in and then used a message box to try to diplay it but to no avail?

Can anyone help please? Hope the explanation is adequate?
 
Paul, when you say..
...that you pass a paramter into and on the basis of this it...
Does it mean you are using the OpenArgs method? If yes, then you can use the Form Open method, to run the procedure..
Code:
Private Sub Form_Open(Cancel As Integer)
    If Len(Me.OpenArgs & vbNullString) <> 0 Then
        If MsgBox("Please verify that this is the Data you need to use for Code execution - " & Me.OpenArgs, _
                    vbYesNo + vbQuestion, "Proceed with this?") = vbYes Then
            'Your Call to the Stored procedure
        End If
    End If
End Sub
Hope this helps..
 
Apologies for my lack of technical speak, Im very new to this area. When I open the form a text box appears into which I type the specific code, i.e. a SEDOL for a equity trade. This is the parameter I am referring to. I dont think from looking at the code I have that the open args method is being used. The code you have put up looks like it could fit my cod ethough if I tinker around with it. I will give it a try and thank for yur help.
 
Please get back to us if you have trouble following it.. We will be glad to help you out.. :)
 

Users who are viewing this thread

Back
Top Bottom