Issues Template downloaded from MS Access template page

T

Tommy

Hi,

I have a question about this "Command Button on a Datasheet Form". I found
a summary about implementing it, but I can't do it and can't contact the
author. here is the steps, I don't know how to do or can't do the step 3,
can someone help please. thanks.


A simple technique for placing a psuedo-command button on a Datasheet:

1. Create a query for the form's RecordSource

2. Add a calculated column/field to the query, for example:

Edit: IIf([Status]<>"Closed","Edit","")

3. Drag the field on to the form as a TextBox

4. Set the TextBox's Is Hyperlink property to Yes

5. Add a procedure to the TextBox's OnClick Event, for example:

Private Sub Edit_Click()
With CodeContextObject
DoCmd.RunCommand acCmdSaveRecord
If (Not IsNull(.IssueID) And .Status <> "Closed") Then
DoCmd.OpenForm "EditIssues", acNormal, "", "[IssueID]=" & .IssueID, , acNormal
End If
End With
End Sub
 
M

MGFoster

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

While in form design view, on the main menu bar click View > Field List.
This lists all the fields in the form's RecordSource query. Drag the
name of the calculated field onto the form. It may try to become a
CheckBox or an OptionButton. If it does just Right-click it and select
the "Change To" > "Text Box."

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
** Respond only to this newsgroup. I DO NOT respond to emails **

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBSMG8ZYechKqOuFEgEQKAMQCfWsnbvPGhjepTlHLS8CjTiq25GTwAoJVE
VFRdjE7/MHPETAFwacGdaBnY
=0rpR
-----END PGP SIGNATURE-----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top