Forms :: Form Working Properly Alone / But Gives Error When Combined With Other Forms
Jun 5, 2015
I have a form "NewMetalF" that has three combo boxes. The first one is used to choose "Precious Metal" or "Base Metal". The second one shows all the metals based on the first combo box. When I open the form in form view alone the combo boxes work flawlessly. I run the form "NewMetalF" within another form "NewExternalPartF" by clicking a button "AddMetal". When the button is clicked "NewMetalF" opens. The first combo box is selected, and when the second combo box is clicked the error "Enter Paramater Value" "Forms!NewMetalF!cboPreciousOrBase".
I'm working in Access 97 and I've got a form that I want to use to create filters with.
There are a couple of things that I'm not clear about and I'd appreciate any suggestions that you can make:
1. The form seems to remember the last filter, so when I click on the Filter by form button it shows the last filter by default. I've included the following in the click event: RunCommand (acCmdRemoveFilterSort) Me.FilterOn = False RunCommand (acCmdFilterByForm) Surely either of the first two statements should remove the filter, shouldn't they? and if not then what are they for?
2. I can't get the 'OR' tabs to show at the bottom of the filter by form screen unless I apply the filter once and then click on the filter by form button again. Is there any way of forcing these tabs to appear?
I have a pop-up modal form which is loaded (like 99% of my other forms) by a button on another form.
Unlike all of my other forms, however, it doesn't load its background properly. If I drag the window off screen and back or shrink and resize, it does look right, so I guess maybe it requires a refresh?Obviously, I don't want to rebuild the form from scratch, so maybe some vba which refreshes the screen?
I have a Main Form with a tab control. On each of the six tabs is a SubForm that takes up the entire tab. So basically I have a tabbed interface for my forms, just with a bit more control over the layout than if I just opened the forms separately in the Access window.
Anyway, on one of those subforms is a button. When you click it, it opens a separate form in a pop-up window, which is used to find a specific record. Once that record is found, you can click another button, and the idea is that this pop-up window closes, and you return to the underlying form, which jumps to the record you selected.
So far so good. Now, if I am working on my program in Access, and I open that subform's source form separately in its own tab, click the icon to open the record finding form, find a record, and then click the button to load that record, the following code runs, and it runs flawlessly - closing the pop-up window, and passing the information back to the main form which displays the proper record:
Quote:
Private Sub ViewRecord_Click() Dim RecordID As Integer RecordID = Me.ID DoCmd.OpenForm "CDLExam", , , "ID = " & RecordID DoCmd.Close acForm, "CDLExamCONT", acSaveNo End Sub
Where my program falls apart is that, in actual use, this form is not open on its own. It's open as a subform on one tab of a tab control on a Main Form. So the third line of code falls apart. Access thinks I want to open CDLExam separately, but it can't because it's already open in the subform, so instead I just end up back at the main window like I want, but the form fails to move to the proper record. Basically, line 3 just doesn't do anything.
How can I make this work? I tried replacing "CDLExam" with the name of the main window, but then it tries to move to the record in the main window, which throws an error as the main window doesn't even have a record source attached to it.
how to refer to the SUBFORM which has CDLExam open, and tell THAT to move to the proper record.
I have a form (frmAddManifest) with a subform (subfrmManifestTransporters).
When creating a new record, I can enter data into frmAddManifest, but the subform doesn't update to link with the record - I presume it's because the record from the main form hasn't been completed yet.
Is there a way to requery the form and/or subform so it stays on the record I was working on, and link the subform properly?
I have a subform that has the Expense Code from the Expense Codes Table and I want to look up the Description (yes I know its not correctly spelled in the formula but it is in the table)
I can't figure out what I have wrong in my code. I've searched all over the forums and the help files in Access. I'm sure it's something simple. Could someone please take a look?
I'm trying to get a sum of all defect quantities between a date range from a user form. Rather than summing all the defect quantities for a defect code, it's summing up the total quantites for each quantity. I'm sure that doesn't make sense so here's an example:
The domain is a query because the dates come from a different table than the defect quantities, so the query is pulling all the relevant data to be summed.
I have Header form and subform subform in it with following fields
Subform fields are :
1. MQE_No : (Text field as it will be like MG-120, MG230), Duplicate OK) 2. RPO_No : (Number field – Double, Duplicate OK ) The are project no. 3. ForemanNo (Number field – Long Int – Duplicate OK)
Header form fields are ;
1.ForemanNo – Long Int – No Duplicate 2.Other fields…
The subform field have ForemanNo One-To-many relationship with Header form.
Following project MG-411 need to enter (assign) to foreman no. 641
Actual data to store in subform
MG-411 (MQE_NO) 5421654 (RPO_NO) 641 (FOREMANNO)
I started to enter data into subform selecting the ForemanNo at header so records to enter in specific foremans account. Everything is fine here.
What I need is:
I would like to select / add another Foreman into the header and start entering same above data for another Foreman. Bcz sometimes we need to do like this in case previous Foreman may go on to a week vacation. We can not stop project for a week. So need to assign project to other foreman.
When selected the Project (MG-411) thru a combo to assign it with other foreman, it should give a short msg to user that this project has already been assigned to “XYZ” forman. Need to assign again “ (Y/N box )
If Y then data entered otherwise cancelled.
To achieve this, I did the following but only 50% success. (Used Cmbo CboRPO2 select MQE_NO). Tried to satisfy both condition but no use.
Private Sub CboRPO_AfterUpdate() If DCount("*", "T_RPO_Footer", "RPO_No = " & RPO_No) > 0 And DCount("*", "T_RPO_Footer", "ENO = " & ENO) Then MsgBox "RPO ALREADY ASSIGNED TO SOMEONE / FOREMAN", vbOKCancel, "WARNING!!!" Me.Undo Exit Sub Else
Dim Msg, STYLE, TITLE, HELP, CTXT, Response, MYSTRING If DCount("*", "T_RPO_Footer", "RPO_No = " & RPO_No) > 0 And DCount("*", "T_RPO_Footer", "ENO <> " & ENO) Then Msg = "RPO ALREADY EXIST WITH OTHERFOREMAN, ASSIGN AGAIN TO ANOTHER ?" STYLE = vbYesNo + vbInformation + vbDefaultButton2 TITLE = "!! ATTENTION !!" HELP = "TEST FILE" CTXT = 1000 Response = MsgBox(Msg, STYLE, TITLE, HELP, CTXT)
Else Me.MQE_NO = Me.CboRPO.Column(0) Me.RPO_No = Me.CboRPO.Column(1) Me.WORKSHEET_NO = Me.CboRPO.Column(2) Me.WORKORDER_NO = Me.CboRPO.Column(3) Me.WORK_DESC = Me.CboRPO.Column(4) Me.PL = Me.CboRPO.Column(5) Me.PipeLineKM = Me.CboRPO.Column(6) Me.DiaMeter = Me.CboRPO.Column(7) Me.PipeLength = Me.CboRPO.Column(8) Me.PipeLineArea = Me.CboRPO.Column(9) Me.P = Me.CboRPO.Column(10) Me.RPO_AMOUNT = Me.CboRPO.Column(12) Me.INV_AMOUNT = Me.CboRPO.Column(13) Me.Status = "WIP" Me.StatusID = 2 Me.CboStatus.SetFocus End If End If End Sub
I tried with following code also
'Dim cdn As String 'cdn = "[MQE_NO] = '" & Nz(CboRPO, "") & "'" 'cdn = cdn & " And ENO = " & ENO
'If DCount("*", "T_RPO_Footer", cdn) > 0 Then 'MsgBox "THIS RPO ALREADY ASSIGNED TO THIS FOREMAN", vbOKOnly, "WARNING!!!" 'Me.Undo 'Exit Sub 'Else ‘do something ‘End if
Hey all, I have a strange problem that I can't seem to find the solution for...
At my work we have a number of computers running W2k with Office 97. We daily have to import excel spreadsheets into Access.
This is never usually a problem as obviously as soon as you click import the import spreadsheet wizard appears.
But on one particular machine it doesn't.
Basically on this computer Access will import the excel file, but won't bring up the wizard that lets you say what to import, whether the first row contains a header, the data type for each field etc, it just asks you to select what sheet you want, then imports it, no options.
Now the ironic thing is that usually this is not a problem as the file is still imported without any problems, but the other day we had a file that once imported was all messed up, all fields all over the place.
When done again on a different computer there were no problems so I'm assuming that this peculiar way of importing is to blame for messing up the data.
Does anyone know how I can resolve this? I have tried dragging the accwiz.dll over the regsvr32.exe and it says it's registered successfully, and I have checked that it is the correct version number, what am I missing?
It would make more sense if it just didn't import, then you could better understand how to fix it, but it's the fact that it does import, just not in the 'usual' way that bothers me. How can I make it bring up the proper import spreadsheet wizard?
I have a query where I'm selecting fields from two tables - Students and Attendance. I have selected option 2 in my Join Properties, i.e "Include ALL records from Students and only those from Attendance where the joined fields are equal". The tables are joined by StudentID. Either I'm misinterpreting what the join is supposed to be doing or it's not working. I need to see every record in Students regardless of whether or not they have a record in Attendance. I need to calculate absences and tardies. If there's a matching record in Attendance, I subtract the date absent from the total days. If there's no matching record in Attendance, I still need to calculate total days and show it. As it is now, if there's no matching record in Attendance, it doesn't do anything. How can I get it to do what the join says, "Show ALL records in Students as well as those that match in Attendance?
I am using the “count function” on an MS Access 2003 Form field. The count function seems to be working fine except it is not placing the result into the table field.
Does anybody know what I am doing wrong?
Can someone show me the proper format for using the count function used on a form field, where the result is to be placed in a table field?
Please Help!!!
Seti UNIVERSE http://www.setiuniverse.com/ All of the SETI (The SEARCH for EXTRA--TERRESTRIAL INTELLIGENCE) disciplines in one place. (Radio, Optical, Microwave, and Amateur SETI) Stop by Seti UNIVERSE and find out, what you didn't know about SETI.
I have a 'yes' check box and a 'no' check box. When the 'yes' check box is ticked, it enables a text box so I can enter a date and disables the 'no' box. Great, how it should work.
However, for some reason, whenever a date is entered into the text box when the 'yes' box is checked, every 'no' box afterwards is greyed/disabled out.
The thing is, it doesn't happen when no data is entered into the text box, when the 'yes' box is checked. So I can have the yes box checked, the no box will grey out as it should, and the text box will be enabled, as it should. But as soon as I enter a date, the above problem happens.
If that's not too confusion, can anyone help?
I've tried attached the database, but apparently it's too big, so i've posted the code underneath.
Cheers
Dan
EDIT: - i've just figured out that this problem is solved when I close the form and re-open it. But obviously I don't want to keep doing this every time I have to enter a date in a record.
Access 2013 People,where the command buttons are not displaying properly?Notice the words and images are nice and centered in the buttons. The buttons are all the same size.Now look at the same DB in Access 2013:
See how the buttons look bloated and the images and wording are not centered anymore. And working on it in design view is a nightmare! When you try to move the command button part of it is left behind every time to try to move it.You can turn the themes property to "Off" but I like the themes.
I have a cascading combo box on a work order form that pulls the contacts from the customer selected in the main box.
It's working fine, values are printing fine on the reports, etc. however on the form itself - when you change from one record to another....the value is not displayed even though it's there if you click the report.
I have a specific question on the datediff function.
My example is =DateDiff("d",[Policy Issue Date],Date()) where [Policy Issue Date] is the inception date of an Insurance Policy.
I need to determine how many days the policy has been inforce. The formula works great in a query and I can see the number of days in that field when the query is run.
However, my dilemma is I want the same function to run off of a text box using its control source property and have the number of days calculate and be visible for each record on the form. This part is not working and the field is returning the #Error? message.
I have a bound form to an invoices table. The form details all invoices raised, all payments made and an outstanding balance. The outstanding balance control is just a basic text box.
On form load, I go to the payment table and select all payments into a recordset, I then add up all payments and use the following calculation:-
Balance = InvTotal - paytotal
The Invtotal is the control on the form that has it's control source set as sum(invoicetotal)
The calculation used to work and the correct balance was displayed, indeed, for one particular client, the calculation works, but for all others, the summed value is blank and so the balance is effectively set to the paytotal value.
I know this is to do with the timing as the form loads and it's records/data are made available, as I have an update button that does exactly the same things as the form load and when pressed, all numbers work.....primarily because the summed invoicetotal value is now available in the form control.
I can see what is happening, but not sure why...I thought that form load gave you all records and would have populated the summed control before triggering the load event....obviously not.....
I've just started using 2010 and, unlike previous versions, the expressions that I've put on controls in a form are not working. Is there a setting that has to change that's new to 2010?
I recently created a database to be used to store incoming invoices. We have 4 suppliers which supply the same material and wanted each supplier to have its own database.
I began by making a database which included all the key tables, forms, queries and functions I would need to then save 4 copies, one for each supplier. This just meant I would not have to repeat the process for each individual supplier.
The problem is all my data is external and upon importing it into the database it has made the search function (combo box) not return results.
I believe this is because: 1) The form was created before the records existed 2) The records were imported from an external source and not created using the form.
However, the way I have designed the form is so I can see all relevant information linked with a specific invoice. This aids in gathering information quickly about an invoice but also so I can input credit note and invoice query information linked to a specific invoice on the same page.
Is there anyway to remedy this?
Or use a similar search function that returns records in my form "Main View"
The last thing I want to do is have to create the form again, although I don't think this will work either as reason 2) states.
I'm using a split form with the datasheet on the left.
When I use the 'Find' in the Navigation buttons at the bottom of the form, it refuse to find text in a particular text box.
The text box is a memo field and is enabled.
Example:
I have text in the memo field which is a title of an episode - "The Outcast."
When I start typing "the" it finds this text in the memo field. But when I type the entire title it the finds the text in another field. ie "out."
I've tried the 3 different Search setting in options. When I use the Find command from the ribbon it work ok as long as I select the text box to search in first.
New to access...just build a form, in which there are combo boxes....cascading of boxes was done.
Now the problem is I want afterupdate function to get activated when user changes the value of one combo....for which I have created a code in code builder... see the code... I think I am making a mistake in writing the code to requery...
I have two command buttons in a subform "sbfScoutRegDetails", one that launches a report and the other attaches the report pdf to an email, associated with the record ID when clicked.
Both of these buttons work fine when just the subform itself is open, but when viewing it in its main form, I get a window saying 'enter parameter value' for "Forms!sbfScoutRegDetails!ID" (this is the WHERE condition in the macro).The report then opens with all the record information blank.The full WHERE condition
Code:
[ID]=[Forms]![sbfScoutRegDetails]![ID]
Not sure if it's because of using a continuous form as a subform? I need the user to be able to view/print or email a contract to each group/contact that signs up.
trying to enable database users to filter records based on column names which i have in a combobox. They enter the required value in a textbox and click the "Find" button.The code (linked to button click event) is not throwing any errors but the records are not being filtered.