I have a mainform (frm_main) with a subform (frm_pyrovola) (linked with "id", with relationship 1-many). In subform, i have a combobox field where it takes data from table/query with the code bellow in rowsource: -
SELECT tbl_apo.per_apo FROM tbl_apo WHERE (((tbl_apo.id_apo)=[forms].[frm_main].[id]));
-
.
Everything, it is ok when I add data for first time in mainform. When I try to connect to specific record of "id" in mainform from another form which is in dataview sheet and show all data from mainform -
Private Sub sys_Click()
-
On Error Resume Next
-
-
-
DoCmd.OpenForm ("frm_main"), , , , acFormEdit
-
-
-
Forms![frm_main].AllowAdditions = True
-
Forms![frm_main].Recordset.FindFirst "id = " & Me.id
-
Forms![frm_main].return.Visible = True
-
Forms![frm_main].cmdClose.Visible = False
-
-
End Sub
-
I manage to find this record, but when I click the combobox, it asks for the parameter ([forms].[frm_main].[id]). I have tried several ways to resolve it, without a posittive way.
Thanks in advance.
Have you tried:
I know it shouldn't matter, as Access can often disambiguate what you are trying to tell it, but this will make it clear that you are referring to another form.
But, if this is a bound control, you will have additional problems.
10 2254
You nneed to requery the combo box before you try to use it:
Thanks for your answer, but same error. It asks about ([forms].[frm_main].[id]).
When are you requerying the combo box? The error is acting like the Form is not open when it is trying to gather data in the query.
At the same time, I am a little confused by teh combo box. If your query pulls "all teh records" with ID = Main_Form.ID, that should be one record. Why not just filter your subform on the ID.
Maybe I am just confused....
Sorry, but I have missed to tell you that the combo box retrieve data from another subform (frm_apo)(linked with "id", with relationship 1-many). So I have one main table (tbl_main) and two other tables (tbl_apo & tbl_pyrovola). And the combobox retrieve data from (tbl_apo).But, if in rowsource write:[CODESELECT tbl_apo.per_apo FROM tbl_apo[/code], It is ok, but I want to filter only the data with tbl_apo.id_apo)=[forms].[frm_main].[id]).
Again, if you are dealing with records in forms, why not just filter the form? Again, I am confused about the usage of a combo box to filter a form. If the form/subforms are related with ID, there should be no need for a combo box, as every time you move to a different record in the main form, the subform filters by the ID. At least that is how is should work.
Here is my database, so if you can check it.
Thanks in advance.
I'm sorry, site rules typically prohibit posting and downloading DB projects. Either way, since I still don't understand the purpose of the combo box, I'm sure it would help me.
I'm sorry, this still does not help me. I still don't understand what you are trying to do.
I also perceive that there may be a language barrier, too, so I am trying to firugre out the intent of your forms. But I still don't understand what your forms so and how this combo box is supposed to work.
I apologize for my slowness on this, but the pictures don't help at all, unless I know what you are trying to do, which is not completely clear at this point.
Have you tried:
I know it shouldn't matter, as Access can often disambiguate what you are trying to tell it, but this will make it clear that you are referring to another form.
But, if this is a bound control, you will have additional problems.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Stanley J Mroczek |
last post by:
How do you load a dropdownlist when edit is clicked in a datagrid ?
<Columns>
<asp:BoundColumn DataField="OptionDescription" ItemStyle-Wrap="True"
HeaderText="Option...
|
by: Bob |
last post by:
Hi Everybody
I have a form called frmListBox that is connected to a table tblListBox.
This is opened from a form called "frmInvoiceOrder" which has a subform called "zfrmInvoiceOrder"
and...
|
by: Vladimir Scherbina |
last post by:
Hello all.
I am trying to edit label in TreeView node, and when I finished editing I
need to get the new data, everythings is okay except that fact that I do not
get a new data, that have been...
|
by: ortega.rad |
last post by:
I have a form which allows you to select a record. That record has
other records asscociated with it via a table. The asscociated records
of the record selected on the main form are shown in a...
|
by: lindabaldwin |
last post by:
Hi there all you smarter than me people!
I am stuck. I have been working on this database for days and cannot figure out how to solve my problem.
I have a form with two embedded subforms. The...
|
by: lchomany |
last post by:
Good Day!
I have a macro created to Open my subform and is embedded in the Command Button.
Main Form: frmADD NEW ENTITY NAME
Subform: frmEntityAwards
My macro filters to the specific...
|
by: RoxyBeginner |
last post by:
I created a form with a switchboard where the user click on one of the buttons. When the form load i want the user to be able to add and edit data by clicking the appropriate button. When I click...
|
by: jimgym1989 |
last post by:
Hi there,
I have 2 PHP files, memeber.php & view.php
This is my member.php
while($row = mysql_fetch_array($strSQL)){
$data .= "<tr>";
$data .= "<td>";
$data .= "<input type='checkbox'...
|
by: ahmedtharwat19 |
last post by:
hi everybody
i tied to pass value from subform to main form but it not work with me!!
I need Send from subform to field in main form
it work when i save the record in main form
i need to...
|
by: Jagruti patel |
last post by:
i can save radio buton value to database but
i can't set to radio button while edit data.
how can i set data to radio button ?
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |