473,221 Members | 2,168 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,221 software developers and data experts.

A2k - records on many side appearing spontaneously - help!

This is the setup;

Main form based on tblBasic (employee records).
The subform is a Single form based on tblContracts.
The forms are linked on basicID which is the primary key in tblBasic and
Foreign Key in tblContracts.

An employee *may* have more than one contract. The default is that each
employee has at least one contract.

I now realise that once I create an employee record this doesn't mean a
single related record is created in tblContracts as I would like. A record
*is* created in tblContracts but it's just empty and the FK from tblBasic is
not there.
So now I am creating a related record with the FK id using DAO.

However when i click onto the subform it automatically creates another
record (with blank basicID).

How can I stop this, and ensure I only have valid records? Each employee
should only have one Contract record to start with.
(If this can be solved then I think the rest is ok; I have code that creates
another Contract record, if the user so desires, which appears to work
fine.)

many thanks
Martin

Nov 12 '05 #1
1 1391
Deano wrote:
This is the setup;

Main form based on tblBasic (employee records).
The subform is a Single form based on tblContracts.
The forms are linked on basicID which is the primary key in tblBasic
and Foreign Key in tblContracts.

An employee *may* have more than one contract. The default is that
each employee has at least one contract.

I now realise that once I create an employee record this doesn't mean
a single related record is created in tblContracts as I would like.
A record *is* created in tblContracts but it's just empty and the FK
from tblBasic is not there.
So now I am creating a related record with the FK id using DAO.

However when i click onto the subform it automatically creates another
record (with blank basicID).

How can I stop this, and ensure I only have valid records? Each
employee should only have one Contract record to start with.
(If this can be solved then I think the rest is ok; I have code that
creates another Contract record, if the user so desires, which
appears to work fine.)

many thanks
Martin


Might be ok now, I have a delete query in the Close event (and various other
places) of the subform that clears out the empty records continuously.
Though if anyone can explain this behaviour or a better way of fixing it
please post.

thanks
Martin
Nov 12 '05 #2

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

Similar topics

2
by: Tony Kennedy | last post by:
Hi, We have a SQL server db backend for our ERP system. I have written a Crystal Report to extract data from one particular table called itemspecbomw (c.30000 records) which contains amongst...
24
by: Greg N. | last post by:
Sorry if this topic has been discussed before: Is there any statistical data available about what percentage of browsers run with JS disabled? Thanks for any and all insights, Greg
7
by: Paul T. Rong | last post by:
Hi everybody, I can not add into the "order_detail" subform a product more than once. The subform just refuses accepting any repeated items. The subform's source is a "expanded_order_detail"...
1
by: Charles Ledbetter | last post by:
I'm missing the mistake. I have a MainForm called frmResources. I have a Second Form and related table called frmFootnotes. I am trying to use it as a subform to the main form appearing in a...
0
by: Fronky | last post by:
Hope someone can help. I am still learning, so no laughing please. I am displaying records from a database using Response.Write(""); instead of the usual datagrid method. I am doing it this way...
0
by: ZMan | last post by:
Scenario: This is about debugging server side scripts that make calls to middle-tier business DLLs. The server side scripts are legacy ASP 3.0 pages, and the DLLs are managed DLLs...
7
by: Ron | last post by:
Hi All, Using Access2000, winXP. Table 1 = tblClients displayed on frmClients via qryClients. 2nd table = tblInvoices shown on frmInvoices via qryInvoices. 2nd table = tblDetails shown on...
0
by: jegathees | last post by:
Hi Friends, I am working in SAP XI Platform. In this, we use XSLT Mapping. I am facing one problem to print in field 'RecordID' starts from 1,2,3 in the target structure for those records...
3
by: Maverick6197 via AccessMonster.com | last post by:
I have a command button on my form which opens the standard windows dialog box and allows you to choose a file. After picking a file, the transferspreadsheet method is ran. This pulls data into a...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...

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.