Office Software Thread, Access - Macro performing differently on different forms/reports in Technical; I have a macro that makes a displayed record click-able in turn opening the record in a new window for ...
9th July 2012, 03:56 PM #1
Access - Macro performing differently on different forms/reports
I have a macro that makes a displayed record click-able in turn opening the record in a new window for editing.
It works as expected when displaying a report, but when called from a form the macro always pulls record 1 despite the item clicked. All data is pulled from the same table using the same macro so in theory should just work.
If IsNull([AssetID]) Then
If Not IsNull([AssetID]) Then
Where Condition = = "[AssetID]"
Window Mode Dialog
Go to Next
Cant for the life of me see why!
Anyone else spot the error?
9th July 2012, 04:33 PM #2
Oh and the tag is -
9th July 2012, 04:42 PM #3
Argh! And now my reports have stopped displaying the clicked link and just show record 1! D'oh
11th July 2012, 11:26 AM #4
For anyone following I rewrote it as code instead of macro and it worked.
Private Sub Text25_Click()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Assets"
stLinkCriteria = "[AssetID]=" & Me![AssetID]
DoCmd.OpenForm stDocName, acNormal, , stLinkCriteria, acFormEdit, acWindowNormal
By HodgeHi in forum Virtual Learning Platforms
Last Post: 10th August 2011, 11:28 AM
Last Post: 1st December 2009, 12:04 PM
By Quatermass in forum Virtual Learning Platforms
Last Post: 16th June 2008, 03:47 PM
By SimpleSi in forum EduGeek Joomla 1.5 Package
Last Post: 22nd May 2008, 11:31 AM
By chrisjako in forum Wireless Networks
Last Post: 6th February 2008, 05:28 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)