Forms :: Macro Does Not Work In A Subform
Jul 8, 2013
I have a sub form that contains two fields of FabricNum(ComboBox) and RollNum(ComboBox). The RollNum is restricted to the FabricNum so whenever I choose a FabricNum, list of RollNum changes respectively.
In order to do that, I created a query that contains the FabricNum and RollNum. The FabricNum in the query is restricted to the chosen FabricNum in the subform. I also have an embedded macro on FabricNum which opens the query, close the query and requery based on RollNumber. All what I have explained work perfect once it gets done in a sub form. When I try to do the same thing in a Main form, it does give me an error.
After researches I realized that I have to change the path in a query and I changed it as following:
[Forms]![FabricUsageDetail1].[FabricUsageDetail2].[Form].[FabricNum].
Unfortunately, I still get an error of 2950 which says the command or action "Requery" is not available now.
View Replies
ADVERTISEMENT
Jun 10, 2013
I have created a simple database, with 2 x tables. The first is a 'Week Ending' table, with a dateid key and Week Ending field. I have created several week-ending dates in order for a user to input details of work done the previous week. The second table contains the details of the work.
I have a one to many relationship between the dateid in the first table, and a dateid of the work details table.
I created a query based on the work details table, and created a subform from that. In a main form I linked a combo box to allow a user to select a date and the relevant work details appear in the subform. However the Week Ending field only shows one date, not a list of the dates I created.
View 7 Replies
View Related
Feb 27, 2014
I have a problem with cascading combo box not working.
I have a one form and with two subforms
One form is "frmReviews" with a subform called "frmbyReviewer" Link Master Fields = Name and Link Child Fields = Reviewer_Name
Then we have the "frmbyReviewer" with a subform called "frmsubMain" where it's Source Object is another form called "frmMain" and linked by Loan_Number
Here's the Design View of it.
View 1 Replies
View Related
Mar 2, 2005
I've got a form with a subform on it that has a subform on it (nested subforms - Customers form with computers subform, which has a software licenses subform on it)
I'm trying to put a button on the top-level customers form that will jump to a new record in the software license subform-subform (the licenses form is displayed as continuous with a blank at the end for new license entry). I want to set the OnClick action to move the record selector on the software licenses subform to the last (new) record in the continuous form display. I can't figure out the appropriate path to use as the Form Name in my GotoRecord macro.
Is there a special trick to use when referencing subform controls?
Slaughter
slaughter at mizzou dot edu
View 2 Replies
View Related
Nov 2, 2006
I have a form named frmtestpkg which has a subform named pkgsubform. The control the subform is in is called pkgsubform1. I have written a macro which works very nicely to hide or show the field [Days2process] if I attach it to "on current" on pkgsubform and open pkgsubform as a form. If I try to open pkgsubform as a subform I get a message stating "The object you referenced in the Visual Basic procedure as an ole object isn't an ole object."
How do I change my macro to refer to the form and controls as a subform?
my Macro looks like this:
condition: [Forms]![Pkgsubform].[CrPkgStatus]<>"Accepted"
Action: SetValue
Item: [Forms]![pkgsubform]![Days2Process].[visible]
Expression: No
condition: [Forms]![Pkgsubform].[CrPkgStatus]="Accepted"
Action: SetValue
Item: [Forms]![pkgsubform]![Days2Process].[visible]
Expression: Yes
View 2 Replies
View Related
Sep 10, 2012
I have created a form with a subform.
When opening the main form I would like to create a macro that is able to set the property visible/not visible for a certain field if a certain condition on another field is satisfied. I Have Office 2010 and with the macro editor I'm not able to make it work. Need writing the text as in the macro editor?
Here below the example:
Main form name: FORM_1
Subform name: SUBFORM_2
Subform field: FIELD_ABC
Subform field: FIELD_123
Subform field: FIELD_CHECK
Opening the form FORM_1, the macro must show the field FIELD_ABC and hide the field FIELD_123 only if FIELD_CHECK is equal to "TEXT OK" ...and the macro must hide the field FIELD_ABC and show the field FIELD_123 only if the field FIELD_CHECK is equal to "TEXT WRONG".
I would like to use the same macro on a report.
View 7 Replies
View Related
Aug 12, 2015
I have a parent form and a sub-form. On the parent form is a date field [JOINED] and on the sub-form there is a date field [DATE PAID] and a field [BQ JOINING FEE] with a default format of currency.
I created a macro to set the value of [BQ JOINING FEE] to 0 if ([DATE PAID]>[JOINED]+60). It sets the value to 0 as required but I am unable to get it to format the result as currency.
View 1 Replies
View Related
Aug 24, 2006
Hello, fantastic site you have here!
I have a form based on a table called TermWithPaysStoredData that shows a single row for everyone in the table with a small amount of info from the table and has controls for a user to enter dates which writes to that same table.
I have a subform that reads that same table but has much more information about each row. I would like to add a button to each row of the main form that says "More Info". When clicked, it should open the subform to the same employee.
The field I want to match is called ID. My main form is called fTermWithPays and my subform is called fTermWithPaysMoreInformation.
I tried using the OpenForm method but that either opens the form to the first record or filters and shows only one blank record.
I'd like to use a macro for this if possible because I don't know VB.
Any ideas? Let me know if more explanation is needed.
Thanks very much!
View 2 Replies
View Related
Apr 6, 2015
I have a bit of a problem with a database in Access 2013. On 1 of the forms, I have a number of buttons which open other forms and filter the results using an embedded macro. All has been well until a few days ago when error 2950 pop up box started appearing. After fiddling around for a while it all works OK (without actually changing anything) until next time the database is opened. I checked to make sure the location is "trusted" and all seems OK.
View 4 Replies
View Related
Dec 8, 2013
I am trying to write a more complex macro that will start another macro at a preset time, however I am getting stopped at the first hurdle - getting a macro to run another macro.
Here is the code i am using at the moment, all I want to do currently is click the first button, then get the second macro to execute. But no luck, getting error 2157 "cannot find the procedure"
Code:
Private Sub Command3_Click()
MsgBox "1st macro running", vbExclamation, "Note"
Application.Run "teststart1"
' Application.OnTime TimeValue("19:55:00"), "teststart1"
[code]....
View 1 Replies
View Related
Jan 7, 2007
I am trying to create a new macro in my database.
I selected the Openform action and tried to choose the name of the form but when I try and select the name of the form from the dropdown menu, I receive the following message:
THE SEARCH KEY WAS NOT FOUND IN ANY RECORD.
I am not able to see any of my forms on this dropdown menu.
Can anyone please help. I am using Microsoft Access 2002.
Thank you.
Rob
View 1 Replies
View Related
Apr 1, 2015
I have date picker which works correctly in form. When I put that form as subform to reports header calendar shows up but after selecting date on calendar textbox stays blank. Format of textbox is Short Date, Show date picker property is For dates.
View 1 Replies
View Related
Mar 9, 2006
please can some1 help??
i created a form using wizard to display the information in three tables but wen the form is in form view theres nothing displayed yet in design view all the information is present. please please some1 help:(
View 1 Replies
View Related
Oct 16, 2014
I'm trying to build a form that Pulls data from several tables, though will update only one. I'm having issues right now with a field that is supposed to draw from a query. I made a query that is supposed to concatenate different fields in another table, look for duplicated words and remove them, but although that isn't working yet, that's not my issue. My issue is that the DLookup in the form isn't even trying to look at the query. The query prints out workshop IDS and a concatenated field right now, so there is data to pull.
=DLookUp("[Expr1]","[Posting Title Query]", "[WorkShop_ID] =" & [WorkShop_ID])
Query name: Posting Title Query
Query Reference Field: WorkShop_ID
Query Data Field: Expr1
Form Name: Sessions
Form Reference Field: WorkShop_ID
Form Table: Session List
View 7 Replies
View Related
Feb 19, 2014
I have a form that maximizes when it loads and that works fine, but when I run a macro to open it the command is bypassed. Is there a way around this?
I've tried setting the code to run on different events (open/activate) but that didn't change anything.
The reason I want a Macro to open it is so I can set the property to Add only, perhaps there's another way I can do that, perhaps as part on the form open event in VBA instead?
View 2 Replies
View Related
Jun 19, 2013
I've created a macro for saving records, but it's just over write on the previous record, what's the best way to save new records using forms?
View 2 Replies
View Related
Jan 9, 2014
I want to run a macro which is having three action queries from the another database when i click the button from my current database. I am using Access2010.
View 3 Replies
View Related
Nov 30, 2005
I have a project. There is an back end database sitting on a network share. And there is a copy of the front end for each of the users also sitting on the network share. (Ideally I would like the front end to sit on the user's local drive, but we can't trust them update the front end every time we change the code behind the form, and I don't know how to force the code change out to their drives.)
Anyway, So we have these files sitting on the network shared drive. When I do an update, I change my copy of the front-end, and after I test the change and see that it works, I then use windows explorer to copy my frontend MDB file, and paste that over the user's front-end file.
That was working fine. But about two or three months ago, if I copy and paste the files, then the user can't open the form in the pasted copy. That is about the time I was "upgraded" to Windows XP. So I had someone still on Windows 2000 do the copy and paste, and that worked. But about a month ago, with no change in that person's PC, his pasted copies no longer work.
When I say no longer work, I mean you can open the MDB file with no error, but when you try to open the form, the pointer becomes the busy pointer, but the form never opens. (Well, the longest anyone has let the machine sit is about an hour before killing access from the task list.)
So, now, I have to go to each person, and do the copy paste on their PC, and so far, that is working.
Any idea what is going on here and how I can fix it?
Thanks,
David
View 1 Replies
View Related
Jan 31, 2014
I have a simple subform that shows an address block.Created as a form, the can shrink property does not kick in. Created as a report, it works fine.All controls and properties and query they are based on are identical.The report pasted into Access 2010 works fine and missing fields shrink.The form pasted into Access 2010 does not.The problem I have is in how do I reference the "subreport" in the form so as to be able to requery?
View 1 Replies
View Related
Mar 18, 2013
I copied Students application in Access 2007 and modified it to fit needs of a school for students with disabilities. I know absolutely nothing about macros, so where needed I substituted VBA. It is now a mix of macros and VBA. But now I cannot post values from a combo drop-down list on the second tab. I get a "boink" sound when I try to post the selection. I have adjusted the properties of each combo field to match where it was successful before and tried again. No results.
The fields are located on the second tab which lists contacts for the student. The proper values show up in the drop-down list. It is just that the value chosen will not populate the field.
I have used combo boxes extensively before, but never in a macro environment.
View 4 Replies
View Related
May 21, 2013
I'm trying to create a simple embedded macro for a checkbox control on a form [Company?]. The default value for this checkbox is No.
I want to write an If statement that basically says "If[Company?] = Yes, then GotoControl[CompanyorNameCombo], Else GotoControl[CustomerFN]
Although the checkbox field label and the control itself IS named [Company?] in the table and set as a Yes/No field, when I try to write the If statement I get an error that says "Microsoft Access cannot find the name 'Company?' you entered in the expression"
That's the name of the control and it is included in the table and shows in the field list.
View 2 Replies
View Related
Aug 21, 2014
know an easy way to use the enter key to automatically run a macro?
I have a login form which works fine. However, at the moment the user needs to type in username and password and then manually click on a 'log in' button. What I would like to happen is that if the user presses enter on the keyboard it will run the same macro as the log in button but without have to click on it?
View 2 Replies
View Related
Aug 9, 2005
This happened yesterday at work.
The access form froze and they could do other things but Access remained frozen. They logged off and when they went back in Access opened but none of the form buttons or links were working.
The database is not split because it is used only by one station at a time.
Has this happened to anyone and does anyone know the cause?
Five people were trying to fix it when I walked into work (5 people who no nothing about Access other than using that one database) and I couldn't get a straight answer.
Thanks
Kim
View 5 Replies
View Related
May 18, 2006
Goal: : To improve an application's performance by basing sub forms and combo
The application has a front and back-end. There is no SQL server involved. I use a module for, seeking out the back-end and automatically linking to the back-end in order that I might be able to provide updates. This has worked for me since first setting everything up.
First let me define what I mean by, “sub form” as to how I am designing my application. I have a number of, what I call, “main (unbound) forms” that are used to open up separate application modules. Each module contains a number of hyperlinks to each of the other application modules. Also, each main form (application module) contains a tab form with bound forms. Therefore, I am calling these lower level bound forms, sub forms and basing them on query files instead of tables. Many of the tables have fields for collecting information across a second form. I did not want to bring back all the fields when they are used in any of the two are three forms bound with the same table.
Problem: When I base either a main form or a sub-form on a query, that particular front-end query form no longer links to the back-end database table via a query file whenever I import everything g into a new/fresh version of the front-end application. Whnever I open one of the query files via the form, I get an error message in each of the fields indicating it can't fine the field even though the table is listed with all the fields. No, I do not have the same problem with forms based on tables.
I suspect that my problem is in what I am calling a main and sub form; and that the main form is really the first level bound form and never the top unbound form if one is used. I have a lot of forms. I just wanted to get some feedback on
my suspicions or find out what else could be the source of my problem before re-doing everything.
Thanks,
John
View 1 Replies
View Related
Jun 14, 2015
I used the Contacts demo on Access 2010, made all the elements Client from web based and then exported to a new database. It worked for the most part but now I am trying to put in a 4 box search and am getting stuck on which form to link it to and also where to put these boxes.
View 1 Replies
View Related
Apr 3, 2013
i have a combobox which i want to use on a touch screen using touch buttons in ms access 2010
i set the combobox ime sentence mode to phrase predict, allow autcorrect to yes, row source type to value list and typed some words that i want in the row source eg. "kitchen"
i've set the on click event of my buttons a,b,c,d..... as following Me.Combo56 = Me.Combo56 & "A" for button a and so on.
the problem is that when i press the first letter of the word lets say "k" for the "kitchen" on my onscreen keypad the combo can not predict the word.
View 1 Replies
View Related