Results 1 to 5 of 5
  1. #1
    Tablerone is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    18

    Pop-up from Datasheet form


    Would someone mind please having a quick look at the Access 2010 Assets web template, and telling me how they set up the red hyperlinked ID column in form Main that then brings up form AssetDetails?

    I really like this, and want to be able to use it in other databases, including desktop (rather than web) ones. I suppose I just look in the properties for this column?

  2. #2
    Tablerone is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    18
    <?xml version="1.0" encoding="UTF-16" standalone="no"?>
    <UserInterfaceMacros xmlns="http://schemas.microsoft.com/office/...InterfaceMacro For="txtID" Event="OnClick"><Statements><Action Name="OnError"><Argument Name="Goto">Macro Name</Argument><Argument Name="MacroName">ErrorHandler</Argument></Action><ConditionalBlock><If><Condition>[Form].[Dirty]</Condition><Statements><Action Name="SaveRecord"/></Statements></If></ConditionalBlock><ConditionalBlock><If><Condition> IsNull([ID])</Condition><Statements><Comment>Open the form to a new record if the current ID is Null</Comment><Action Name="OpenForm"><Argument Name="FormName">AssetDetails</Argument><Argument Name="DataMode">Add</Argument><Argument Name="WindowMode">Dialog</Argument></Action><Action Name="Requery"/></Statements></If><Else><Statements><Comment>Use a TempVar to pass a filter to the OpenForm action</Comment><Action Name="SetTempVar"><Argument Name="Name">AssetDetails_ID</Argument><Argument Name="Expression">[ID]</Argument></Action><Action Name="OpenForm"><Argument Name="FormName">AssetDetails</Argument><Argument Name="WhereCondition">[ID]=[TempVars]![AssetDetails_ID]</Argument><Argument Name="DataMode">Edit</Argument><Argument Name="WindowMode">Dialog</Argument></Action><Action Name="RemoveTempVar"><Argument Name="Name">AssetDetails_ID</Argument></Action><Action Name="RefreshRecord"/></Statements></Else></ConditionalBlock></Statements><Sub Name="ErrorHandler"><Statements><Action Name="MessageBox"><Argument Name="Message">=[MacroError].[Description]</Argument></Action></Statements></Sub></UserInterfaceMacro></UserInterfaceMacros>

    Well I just learnt from a video tutorial that you can now easily copy and paste code into a forum (as XML), so here is what appears to be the relevant code. I don't understand it perfectly, and certainly less in this format.

  3. #3
    Tablerone is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    18
    OK, looking at this in Access 2010 (where the presentation is much clearer), I'm beginning to understand this.

    But what about "Data Mode" set to Edit or Add. Is "Data Mode" a widely used parameter or would they have had to have defined this as part of creating form AssetDetails?

  4. #4
    Tablerone is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    18
    Really hope someone else can chime in and help me out here. Could this code be used to create this functionality in Access 2007?

  5. #5
    Tablerone is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    18
    Deleted: I posted this particular reply in the wrong one of my two related threads.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. BeforeUpdate in a Form in Datasheet view
    By fitshase in forum Forms
    Replies: 7
    Last Post: 07-29-2011, 08:53 AM
  2. Datasheet form problems...
    By RemonKoybito in forum Forms
    Replies: 2
    Last Post: 06-29-2011, 12:15 PM
  3. validation with a datasheet form
    By Grooz13 in forum Forms
    Replies: 1
    Last Post: 01-12-2011, 10:42 AM
  4. Replies: 0
    Last Post: 12-25-2008, 10:05 AM
  5. Form - Datasheet View
    By kalove in forum Forms
    Replies: 0
    Last Post: 06-20-2007, 11:29 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums