473,769 Members | 6,203 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

? about cascading updates with lookup table changes

(I originally posted this to the data access newsgroup but received no replies)

I've got an Access 2003 mdb that I'm converting to VB.Net. I'm having
trouble with getting the main data source to update after updates to a lookup
table.

There are 2 tables with a one-to-many relationship in the mdb. VB.Net
recognizes this relationship according to it's dataset designer diagram.
Currently I have 2 forms: a main form for data-entry and a form for updates
to a lookup table. Data for this lookup data is in a combobox on the main
form. When I modify one of the items on the lookup form, the data on the
main form does not get updated until I've closed the form and reopened it.
The data in the lookup table gets modified as expected.

I assume I have to update the table adapter for the main
form after saving the changes to the lookup table. I tried the following
code after updating the item on the lookup form (not both lines at the same
time):
Form1.TblPhotos AndImagesTableA dapter.Fill(Me. PhotosAndImages DataSet.tblPhot osAndImages)
Form1.TblPhotos AndImagesTableA dapter.Update(M e.PhotosAndImag esDataSet.tblPh otosAndImages)

But the table adapter does not update until I exit the application. How do
I update it immediately upon saving the item on the lookup form? Thanks for
any help or advice.

Nov 28 '07 #1
0 1267

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1415
by: Roger | last post by:
Subset of Database Tables/Fields are as follows: Table1 Field1 and Field2 values can occur multiple times in the table Table2 Field1 has a unique value in the table Table3 Field1 and Field2 when combined have a unique value Table1 Field1 and Field2 not indexed Table2 Field1 indexed - unique values Table3 Field1 and Field2 multiple field index - unique values Relationships defined as follows:
1
314
by: Next | last post by:
Hi Folks, I have added a ListBox lookup in one of my access tables. Problem is, my form does not reflect the changes (in other words, the form does not display the ListBox). Is there a way to sync up the form so that it reflects the design changes in my table without rebuilding or editing the form? Thanks
0
1643
by: Frnak McKenney | last post by:
One part of a customer project I'm working on involves what seem like fairly straightforward updates to a set of related tables. While I've developed software for a number of years (it only seems like centuries on days like this <grin>), I'm new to C# and ADO.NET and I'm running into problems with record deletions. I (think I am) applying ForeignKeyConstraints correctly. I'm not applying DataRelations (yet), but those _appear_ to be...
4
4620
by: jon f kaminsky | last post by:
Hi- I've seen this problem discussed a jillion times but I cannot seem to implement any advice that makes it work. I am porting a large project from VB6 to .NET. The issue is using the combo box bound to a table as a lookup, drawing values from another table to populate the available selections. This all worked fine in VB6. I have distilled the problem down to a simple form drawing data from the Northwind database for a representative...
0
1262
by: dbuchanan | last post by:
Hello, For my datagrid I added a datagrid table style to include columns from my lookup tables. These display the values in the lookup tables rather than just the integer key value stored in the data table. When I make selections in bound combo boxes on the form and save the changes the datagrid which is populated by the following stored procedure does not reflect the changes for the referenced lookup tables until I close and reload...
4
2078
by: ApexData | last post by:
I have a 15 LookUp Tables tied to 15 ComboBoxes. Some of the Tables contain 3 to 10 Recs, and a couple contain up to 50 Recs. 1- Is it a CommonPractice to link the field that gets the ComboBox result, to the Lookup Table to ensure Referential Integrity and Cascaded Updates? 2- Also, should the LookupTable PrimaryKey be an AutoKey or the Name of the main field being referenced, which in my case would average 15
19
2327
by: Amanduh | last post by:
Hi again, brilliant developers. I'm having serious issues with cascading comboboxes. I had it working perfectly before, but then was asked to add an additional variable and everything went haywire (surely due to my incompetence). I've printed out Rabbit's tutorial and read it many times, but like others, I feel I need a more elementary approach. Please let me explain: I'm creating a database for entering information for research studies. ...
7
5840
by: Toireasa | last post by:
Hi, Newbie Access developer here, and my first post on this forum, so I might not get everything right - thanks in advance for your help and your patience! I'm using Access 2007, in XP. I'm currently trying to set up a whole pile of cascading combo boxes of different levels of complexity, so I started with the easiest set - and can't even get that to work (even using the tutorial on this site at...
1
1667
by: CoreyReynolds | last post by:
Hello, I have attached a picture of my Access form. Each record has a delete button beside it, pressing it deletes the record and cascades to the child records. Horray. Except sometimes, for a reason I can't explain it doesn't work. I have to click off a record then back onto it and it will work. I'm using the default VB code that access generates to perform the delete "The table cannot be deleted or changed because table includes...
0
9589
marktang
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10211
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9994
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7409
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6673
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5299
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3959
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.