473,670 Members | 2,624 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem setting LinkChildField property in VBA code

Greetings,

I have an application that was originally designed in Access 2000. It
has been transformed to Access 2002 (XP), Access 2003, and now Access
2007.

I have a form and subform, the underlying tables have a one-to-many
relationship.

The recordsource of both the main form and the subform are set in VBA
code, in the 'on open' event of the respective forms. A SQL string is
composed in code and then set as the form's recordsource.

The LinkChildFields property of the subform control is also set in VBA
code, also in the 'on open' event of the main form. The
LinkMasterField s property is hard coded in the property box of the
form.

This construction has worked fine in all previous versions of Access,
until now. When I try to open the form, Access displays an error
message, informing me there is something wrong in the 'FROM clause' of
the subform. In debug, the line setting the LinkChildFields property
is highlighted.

I think the error message is misleading, because the actual FROM
clause seems fine to me, also when I remove the line setting the
LinkChildFields property, both forms display fine. Of course the
records in the subform don't match those in the main form because the
link is removed, but at least some records are displayed indicating
that the recordsource sql string does not contain any errors in
itself.

I have the same problem with all of my subforms, which are all
designed along the same principles.

This must be something new since Access 2007, as I have never had any
problems with this in earlier versions.

Can someone help ?

Regards,

Peter.

Apr 10 '07 #1
0 1784

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

Similar topics

1
1539
by: Matik | last post by:
Hello to all, Maybe first small introduction: - SQLServer 2000 SP3, - XP Pro EN, - ActiveX, - SP in database It should working like this. There is a instanse of an object working, which recieves "telegramms"
7
4367
by: Michael Cleroux | last post by:
I'm working with Access2002 I'm trying to get the Sub-form to filter correctly programmatically. I've got the records loading up correctly in the form, and sub-form, with the exception that the sub-form is displaying all the records instead of the appropriate sub-set. Whaterver I try with the LinkChild and MasterFields, I either get no error and no effect or 'RunTime Error 31, Data Provider could not be initialized' What is the...
18
18362
by: Dixie | last post by:
Can I set the Format property in a date/time field in code? Can I set the Input Mask in a date/time field in code? Can I set the Format of a Yes/No field to Checkbox in code? I am working on a remote update of tables and fields and can't find enough information on these things. Also, how do you index a field in code?
1
1228
by: Jack Black | last post by:
Using VS.Net 2k3 to build ASP.Net pages with VB code-behind... OK, this is getting silly. I have some basic textboxes (Server controls) on a webform. Some are coming up with white backgrounds, and some are coming up with yellow backgrounds. 1) There is no CSSClass setting on any of the textboxes 2) BackgroundColor properties are NOT getting set in code. 3) Forcing a CSSClass or BackgroundColor property in code on the yellow fields...
7
2643
by: Frank Maxey | last post by:
I am fairly new to VB.Net and am having a curious problem. I have an entry dialog form called from a main form. The calling form needs to check the DialogResult field for an OK response. In my button service in the dialog form, I have: Private Sub btnSave_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles btnSave.Click
6
1516
by: David Hearn | last post by:
I have a property in a user control that I am setting: Private strPageName as String Public Property PageName() as String Get Return strPageName End Get Set(byVal Value as String) strPageName = Value End Set
11
2439
by: jesdynf | last post by:
I'm having trouble applying a stylesheet to content I'm generating after the fact. Here's the sample code: <html> <head> <title>CSS/DOM Problem Example</title> <style type="text/css"> ..historylinks {
0
1173
by: =?Utf-8?B?Q2hyaXMgV2Fsa2Vy?= | last post by:
PropertyBinding can be a great way to save user settings, but there is a problem with using PropertyBinding on ToolStrip items. I've found a solution to the problem and am sharing it here since I couldn't find a solution anywhere on the web. To recreate the problem: Add a ToolStrip to a form. Add a TextBox to the ToolStrip. PropertyBind the Text property of the TextBox (to do this, view the properties of the TextBox, go to...
0
1999
by: Lyn | last post by:
I have a problem using the form .Filter and .FilterOn properties which causes Access to crash (as detailed in a separate post). The form operates in continuous mode, displaying matching records from a file based on a search criterion. This basic functionality works just fine. I decided to allow the user to narrow down the output by providing some extra controls to allow the user to filter the recordset via the .Filter form property. ...
0
8468
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
8386
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
8901
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...
0
8814
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8591
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,...
0
8660
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7415
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
2
2041
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1792
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.