Question access 2010 macro & open form

I'm trying to open a new form via double-click on a cell of a sub-form.

I want the form that is opened via the double click to display the record of the line that I double-clicked.

It works fine with this code:

Private Sub ID_DblClick(Cancel As Integer) DoCmd.OpenForm "F_New_Non_Hedged_Share_Class", , , "[ID] = " & Me!ID End Sub

However, since I'm trying not too much vba code, i'd like to setup that kind of thing via access 2010 macro.

So I have:
Open Form
Form Name: F_New_Non_Hedged_Share_Class
View: Form
Filtername:
Where condition:
Data Mode:
Windows Mode: Normal

Question: I'm assuming that I need to update the "where condition", but what should I put? I tried different things, ie. [ID]=[ID], etc - but without success

fyi: the dbl click is not on the ID field of the sub-form but an other field. I'm assuming this doesn't change anything

Sponsored Links:

Related Topics

Every Data Base I create gets corrupted
Using access 2010

I can code for hours, create forms, queries, what ever I want.

I worked on this application all day without issue. Open & closed it maybe 30 times.

I was just finishing up and all I did was create a autoexe macro to open a specified form when starting up.

Now I get a message saying that access has experienced a problem and needs to close.

It will ask me if I want to compact & repair and try to open again but I get the same error on any backup.

This has happened on every application I have written this week. (actually this same one 3 times)


access runtime 2010 dont show some forms content
I have a question that I have implemented database with access runtime 2010 I have a navigation form opens up which provides buttons to open different forms & reports. but I cannot open some of the forms in runtime although title heading appears but other content just goes blank, it has subforms in it . . some forms opens and some reports as well but some form just doesn't, and on the notification bar it asks for a save as?


Importing Forms Question
Recently imported some forms into Access 2010 from the old version of the program we're updating, the old version was made in Access 2003.

A macro was present in the old version that didn't import in, but it still tries to run it but I cannot find where it is actually being called.

Also, the form constantly prompts for a value from a form that is in no way associated with the imported form.

So two problems:

Imported a form from Access 2003, macro tries to run that isn't in this version, can't find where it's calling it
Form keeps promptimg for a value from a separate form that has nothing to do with the current form


Any advice on where to look for the macro or to stop it from being called? All these prompts and errors happen before it gets to the Form Load or On Open event. Is there another event that happens before those?


Form After Open Event ?
Forum, access 2010 accdb.

I have a question to ask the Operater subject to what data is in a Form Control.

Problem is, if I put the code in the Form Current Event, the question is asked before the form is displayed

Is there an Event that is "last" like an After Open Event


Access 2010 - Creating a Data Macro
Office 2010 Developer Training Course > Access 2010 > Building Solutions with Access 2010 Lab using the Contacts Web Database template.

I'm at Exercise 4: Creating a Data Macro and for whatever reason my macro is not working at all.

I created the macro and confirmed it matched to the guide and I had no errors when I saved it, so that has to count for something.

The macro is suppose to be invoked when the 'Status' variable is "Offer Outstanding" more than once in the database.

Yet I can select it multiple times without any instances of the macro displaying any warning message as it should.


Access 2010 to Word 2010
I am having a problem with creating a button in access that will open a word doc and populate fields in it. Seems easy right? There's a million tutorials right? No. not right.

I have done a lot of research on this and have yet to be successful. I am pretty familiar with access, and and very familiar with word mail merge, but due to the frequency of needing tocreate these letters I am hoping to streamline the process to the click of a button each time.

The issue is that the form I have open in access is populated with the data is opened using a "find Group" query, that has a criteria "Like "*" & [Group Name or Keywords?] & "*"" for group name.

I can create a macro to open the mail merge doc, however, when I try to create the mail merge doc to open the "find Group" query is empty and I cannot include any fields.

I have even gone so far as to experimented with including report type field calls to access the form directly (eg =[Forms]![Find Groups]![Group Name]) and nothing.

I am about read to throw my computer off the bridge and join a nice Amish community.


Access 2010 Default Macro Behaviour
When I use a form wizard in Access 2010 and create a button, it defaults to creating a macro to perform that button's action. How can I change this so it never creates a macro but it builts VBA


Access 2010 & Window 7
I had to replace my work computer so now I have Windows 7 home premium and office 2010. I'm connected to a network. I've had some issues. I create a shortcut on my desktop for an access application and it doesn't open the application. It works if I open access up locally and then go to the network directory and open the application. Does anyone have any idea what is going on? I noticed something else that I think is a problem. When I open access 2010, click options, at the general options screen at the " Default file format for blank databse:" dropdown I don't have Acess 2010 as a choice. I would think I should see 2010, am I correct


Running App using Macro
I am trying to create a macro to open an application called CRONOS.

My question is that can we use the macro in MS Access to open any application stored on our computer?

Also is it possible to write a macro which does the following:

1) Run Application CRONOS
2) Exports data table which is a result of a form in excel
3) Export that excel data table in CRONOS

In case you want to know, CRONOS is a time series analysis tool


Access 2010 Macro
I have an MS Access 2010 Database that will be run @ 6:00 AM Automatically. The Autoexec Macro has been created. the purpose of the Macro is to update a local table with data from SQL Server. In previous versions of Access I used setwarnings = off to accomplish this without user intervention. However in MS Access 2010 I don't find that option. Anybody know where it is or how I can accomplish this


2010 VBA "do while" code in a macro
In Access 2010, want to run perform a "do while" loop in a macro. I understand VBA is the way to do this. So, I think I want to run a VBA script in a macro.

This Macro runs against a Form that has a SubFrom (MainForm named "Expense ID" & SubForm, "Expense"). Macro is initiated by pressing a button.

I would like help with some VBA code showing how to perform the following:

1. Evaluate a field ("Activity") in the first record of Subform ("Expense") against condition "Is not Null".

2. If condition is true, set value of another field ("Post") in the same SubForm record to "1".

3. Move to next record and repeat steps 1 & 2 until all Subform records are evaluated.

4. Return to macro that initiated the VBA script to perform the next action in the macro.


Need form to open upon database opening
I need to make a particular form open when my database opens. I know I need to use a macro, and I thought if I used autoexec in the title when I built my macro it was a tip to the database to open that macro immediately and proceed with the actions listed. Am I totally off base here? My macro works fine when I single step it, but then when I close the database and reopen it, the macro does not begin automatically and I still have to choose the form I want from the navigation pane rather than having it open right up to it for my employees


Close Form Macro
I am a new Access user and have Access 2010. I have recently started working for myself and have created a Client/Work database using only the Access Wizards (I have no clue about modules etc) I have created an opening Welcome Form that opens via an autoexec macro. I wanted this form to close on timer and for another form to open. My problemis that whilst I have created a macro that on timer opens the new form, but I cannot find anywhere a CloseForm macro action. The nearest I have found is a RunMenuCommand action of "Close", but that doesn't seem to work


Input date for a macro
I have just upgraded from Access 2002 to 2010. I want to write a macro to set the default value for a field in a form, the value is a date. But I can't find the InputBox in the list of commands for a macro .

but have usually been able to write my own macro's before . I'm just having a bit of trouble working out macrosin Access 2010 are written!


How to you tell Access 2010 to run VBA code?
I started with creating a Macro in Access 2010 which is very repetitious (open a query, update and close. move to next query). I used the Macro builder to make sure I got the right code commands and then converted to VBA because it is my understanding running code is better than running a macro (but I still haven't seen anything thatexplains to me why that is so).


ODBC connection and running something every hour or so
I have more than 1 question and not sure if I should open a thread for each question or if combining them is ok.

if I shouldnt've combined them - I'm sorry.

1. is there a way to create an ODBC connection by code? so that I don't have to go on every computer and create the ODBC connection (I'm talking about going to the window below in case I'm using wrong words to describe it)

2. how do I run some code inside in Access db every few hours without using Windows Task Manager to open a database that has an autoexec macro?

3. I'm thinking of letting some computers use 2010 Access Runtime. i've never used it myself or had users use Runtime without having Access installed. does anyone know if there are issues?


Question on startup priority
I read that when Access opens it first processes the startup options, THEN it will look for the AUTOEXEC macro to run.

My question is. because it processes the startup options first, and I have my switchboard form to open on startup, will code in my switchboard form's OnOpen event execute before the autoexec macro would be executed


Access 2010 to Access 2003
I have been reading for what seems like forever but haven't seen the exact words I need to in order to make a decision. I am trying to decide between Office 2007 and Office 2010. I am wondering if Access 2010 can open, use, and save Access 2003 *.mdb file format.

I have found the following quote and when reading its suggestion it would lead me to believe it would but then there is that little warning that "Because Access 2010 has many similarities with Office Access 2007, such as the same native file format," I'm not totally convinced.

Migration considerations
When you plan a migration to Access 2010, changed, and removed for Access 2010. Because Access 2010 has many similarities with Office Access 2007, such as the samenative file format, you can also review and use the existing migration documentation for Office Access 2007 when you migrate to Access 2010.

So my question is can Access 2010 open, use, and save databases in the Office 2003 file format?


Macro - Filter by scheme
I am really frustrated. I cannot do the simplest things. I am reading and reading, and the speed is too slow. Question: I have an open form. In that form I want a control to do a macro. The task is the following events: Home>Advanced>Filter by scheme. The first event in the macro should be to empty the form. HOW DO I DO IT?!


SetWarnings macro command in Access 2010
In Access 2010, while building a macro in design view, the SetWarnings action command is not available in the "Add New Action" drop-down menu. I can import a macro from an earlier version of Access and copy/paste the SetWarnings into my new macro, Is there a different command in Access 2010 or am I missingsomething?