473,403 Members | 2,323 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Field not Updating

47
I have a search form(BusquedaProd) with several text boxes and Combo boxes to search products within a subform(SubFormRawProducts) inside it; its working fine, the subform has following field:
ProdId(AutoNum,PK),
ManId(Number,FK)
ManPartNo(Text)
ProdDesc(Text)
The manufacturer(ManId) is a Combobox where you pick the manuacturer to assign to a product, but some times you have to add a Manufacturer that is no in the list, so DoubleClick the ManId Field the AddManForm opens and you can Add new Manufacturer data.
In the AddManForm Close event I wrote some code to requery the [ManId] ComboBox inside the SubFormRawProducts, but Im confusing about how is the right way to point to the [ManId]Field in the sub form.
I have the following code but nothing happens, no error showed up but also the ManId Field doesn't refresh

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Close()
  2. If (IsLoaded("SubformRawProducts")) Then
  3. Forms!BusquedaProd!SubformRawProducts!ManId.Requery
  4. End If
  5.  
  6. End Sub 
any help will be apreciated

Thanks
Raymundo Walle
Aug 13 '10 #1
3 1189
try a macro on the form close the [...] macro buiilder

then use requery and specify this field without the if

just an idea hope it helps
Aug 13 '10 #2
Stewart Ross
2,545 Expert Mod 2GB
Hi. We have an Insights article on referring to items on a subform which can help you on the correct syntax for such control references.

Line 3 in post 1 is missing the .Form part of the reference to the subform:

Expand|Select|Wrap|Line Numbers
  1. Forms!BusquedaProd!SubformRawProducts.Form!ManId.Requery
-Stewart
Aug 14 '10 #3
Jerry Maiapu
259 100+
I do not know but try: It works for simailar scenerios.

Expand|Select|Wrap|Line Numbers
  1. Docmd.Requery "SubformRawProducts"


Simply refreshes the sub form
Aug 15 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: Jason | last post by:
Let's say I have an html form with 20 or 30 fields in it. The form submits the fields via POST to a php page which updates a table in a database with the $_POST vars. Which makes more sense? ...
0
by: Jim S. | last post by:
I'm having a horrible time simply inserting the date in a MySQL database through a Visual Basic program. I have a table, called "ORDERS"; "ID" is the primary key. I'm trying the insert the date,...
1
by: Srinadh | last post by:
Hi all, We have files with about 20 to 30 fields per row. We are trying to update such files with about 60 rows as contiguous data in a CLOB field. It passes through. But when we try...
1
by: GKINLEN | last post by:
Help please I'm sure this simple but I'm new to Access. I have a table that needs a field updating from a calculated text box on an import form. How do get the record in the table to contain the...
5
by: junglist | last post by:
Hi guys, I've been trying to implement an editable datagrid and i have been succesful up to the point where i can update my datagrid row by row. However what used to happen was that once i updated...
11
by: Eych | last post by:
I get a VB error when I try to update a table whose field I change with the following statement: dcUpdate.Dataset.Tables(0).Rows(0)("User Name") = Me.textbox1.Text if I change the field name...
7
by: webmaster | last post by:
I have a form that is using HTML and PHP to make calculations for an order form. One of the fields is asking for a total number of workstations. I would like this field to be a real-time total of...
4
by: Geoff | last post by:
Hi I'm hoping somebody can help me with the following problem that has occurred to me. Suppose I have two tables in an SQL Server database. Let's call these tables A and B. Assume that A has...
2
by: =?Utf-8?B?VmFuZXNzYQ==?= | last post by:
Hi All! I am with a situation where I am not getting the right updating to the form's fields. The situation is the following one: I have one combobox and one textbox. I am using the...
0
by: Mike | last post by:
So here's the situation (.NET 2.0 btw): I have a form, and on this form is a textbox among many other databound controls. The textbox is bound to a field in a data table via the Text property. ...
0
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
0
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...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.