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

Linked form question

I have an Invoice form and a Jobcard form. They're bound to tblInvoices and
tblJobcard. These in turn have a many to many relationship through a
junction table. The Jobcard form is based on a query using tblJobcard and
tblInvoiceJobcard (junction table).
I currently have to select the correct invoice from a combo box on the
Jobcard form. What I want to do is open the Jobcard form from the Invoice
form and automatically write the appropriate keys to the junction table. I
don't want the jobcard as a subform as I sometimes need to write parts to
the invoice without any jobcard being involved.

What's the easiest way to do this. I may need to write several jobcards for
the one invoice, so would have to write the same invoice key to the juction
table for each jobcard called from that particular invoice on the invoice
form.

Any suggestions greatly appreciated

John

Table structure is as follows

tblInvoices
pkInvoiceID
InvoiceNumber
InvDate
etc

tblInvoiceJobcard
pkInvoiceJobcardID
fkInvoiceID
fkJobcardID
fkCustomerID

tblJobcard
pkJobcardID
JobNumber
JobDate
etc

tblPartsDetails
pkPartDetailId
fkInvoiceJobcardID
PartNumber
Description
etc
Nov 13 '05 #1
4 1609
"John" <br****@gofree.indigo.ie> wrote in
news:dd**********@reader01.news.esat.net:
I have an Invoice form and a Jobcard form. They're bound to
tblInvoices and tblJobcard. These in turn have a many to many
relationship through a junction table. The Jobcard form is
based on a query using tblJobcard and tblInvoiceJobcard
(junction table). I currently have to select the correct
invoice from a combo box on the Jobcard form. What I want to
do is open the Jobcard form from the Invoice form and
automatically write the appropriate keys to the junction
table. I don't want the jobcard as a subform as I sometimes
need to write parts to the invoice without any jobcard being
involved.

What's the easiest way to do this. I may need to write several
jobcards for the one invoice, so would have to write the same
invoice key to the juction table for each jobcard called from
that particular invoice on the invoice form.

Any suggestions greatly appreciated
I have to make some assumptions here:
1) You want a command box that opens the jobcard form,
2) The on the JobCard form you want to find a particular job
number and click on a button to add the invoiceID and the
JobcardID to the InvoiceJobcard table.

(if those are wrong, the following will not be valid.)

Create a button on the invoice card, that opens the Jobcard
form.
In the on click event for the button, add the command to open
the form and pass the invoiceID value in the openargs position
of the docmd.openform statement (see the help.

In the Jobcard form process the openargs value to display it as
the value in a textbox or your combobox.

That saves you from having to reselect the Invoice number each
time you open the form.

As an alternative, if you never open the Jobcard form unless the
Invoice form is open you could simply add a textbox that refers
to the textbox that contains the invoice number on the invoice
form.

It may be easier, but you'll get #name errors if your invoice
form isn't open.
John


--
Bob Quintal

PA is y I've altered my email address.
Nov 13 '05 #2
>What I want to do is open the Jobcard form from the Invoice form and
automatically write the appropriate keys to the junction table. I don't
want the jobcard as a subform as I sometimes need to write parts to the
invoice without any jobcard being involved.


Maybe you are asking one form to do too much. What about having one form
with the jobcard as a subform in order to show the jobcards related to
invoices, and another form used to write parts to the invoice?
Nov 13 '05 #3
For a clean user interface, I want to be able to write up all invoices from
one form. It's a bit messy having "Invoices with jobcards" and "Invoices
without jobcards"
My Invoice report will group jobcards and the parts and labour used on each
job separtely and if no jobcards exist it will just list parts. I want to be
able to open the invoice form and enter all data for a particular invoice
from the one place.
"Mondrogan" <mo*******@comcast.net> wrote in message
news:S7********************@comcast.com...
What I want to do is open the Jobcard form from the Invoice form and
automatically write the appropriate keys to the junction table. I don't
want the jobcard as a subform as I sometimes need to write parts to the
invoice without any jobcard being involved.


Maybe you are asking one form to do too much. What about having one form
with the jobcard as a subform in order to show the jobcards related to
invoices, and another form used to write parts to the invoice?

Nov 13 '05 #4
Thanks for that. The Jobcard from is regularly open separately from the
invoice and writes a new record to the junction table leaving a blank field
for fkInvoiceID.
Two things I need to do.
1. Open new invoice which writes to invoice table, then select existing
jobcards and write new invoiceID to appropriate record in junction table for
each existing jobcard.

2. Open new invoice and write new jobcard or jobcards for this invoice and
write data to all three tables.

Can I do this using the openargs method. There is a hidden textbox in the
jobcard form bound to pkInvoiceJobcardID.
John

"Bob Quintal" <rq******@sPAmpatico.ca> wrote in message
news:1124234182.cd2e6372c7991150fc3238ab63c5a192@t eranews...
"John" <br****@gofree.indigo.ie> wrote in
news:dd**********@reader01.news.esat.net:
I have an Invoice form and a Jobcard form. They're bound to
tblInvoices and tblJobcard. These in turn have a many to many
relationship through a junction table. The Jobcard form is
based on a query using tblJobcard and tblInvoiceJobcard
(junction table). I currently have to select the correct
invoice from a combo box on the Jobcard form. What I want to
do is open the Jobcard form from the Invoice form and
automatically write the appropriate keys to the junction
table. I don't want the jobcard as a subform as I sometimes
need to write parts to the invoice without any jobcard being
involved.

What's the easiest way to do this. I may need to write several
jobcards for the one invoice, so would have to write the same
invoice key to the juction table for each jobcard called from
that particular invoice on the invoice form.

Any suggestions greatly appreciated

I have to make some assumptions here:
1) You want a command box that opens the jobcard form,
2) The on the JobCard form you want to find a particular job
number and click on a button to add the invoiceID and the
JobcardID to the InvoiceJobcard table.

(if those are wrong, the following will not be valid.)

Create a button on the invoice card, that opens the Jobcard
form.
In the on click event for the button, add the command to open
the form and pass the invoiceID value in the openargs position
of the docmd.openform statement (see the help.

In the Jobcard form process the openargs value to display it as
the value in a textbox or your combobox.

That saves you from having to reselect the Invoice number each
time you open the form.

As an alternative, if you never open the Jobcard form unless the
Invoice form is open you could simply add a textbox that refers
to the textbox that contains the invoice number on the invoice
form.

It may be easier, but you'll get #name errors if your invoice
form isn't open.
John


--
Bob Quintal

PA is y I've altered my email address.

Nov 13 '05 #5

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

Similar topics

6
by: Andreas Lauffer | last post by:
I changed from Access97 to AccessXP and I have immense performance problems. Details: - Access XP MDB with Jet 4.0 ( no ADP-Project ) - Linked Tables to SQL-Server 2000 over ODBC I used...
11
by: C++fan | last post by:
Suppose that I define the following class: class example_class{ public: example_class(); void funtion_1(); void function_2(); protected:
12
by: Neil | last post by:
I previously posted re. this, but thought I'd try again with a summary of facts. I have an Access 2000 MDB with a SQL Server 7 back end. There is a view that is linked to the database via ODBC...
1
by: Annette Massie | last post by:
I have a database with a linked table within it. I have a query form that opens and allows the user to select criteria and then the form is filled with data found from the linked table. At...
2
by: MX1 | last post by:
This is weird. I'm trying to make a subform on a form and have it show the entries from one of my tables. The odd thing is that when I look at the table itself, I can see a "+" sign next to each...
7
by: smd | last post by:
Hello and thanks for taking the time to read this. I've looked all over the web and newsgroups and can't find a solution to my problem. I've posted this question to the Access 2000 group as well -...
10
by: Jim Devenish | last post by:
I have a split front end/back end system. However I create a number of local tables to carry out certain operations. There is a tendency for the front end to bloat so I have set 'compact on...
1
by: CanuckChuck | last post by:
Hello, This question may sound too general and confusing but I am trying to keep it simple. I have a form that managers log into to view a list of the employees reporting to them. They are...
1
by: tbeer | last post by:
Hello. I have created a 2007 database to help organize a golf outing event which requires the collection and tracking of a lot of linked data. Everything in my dbase is linked to my Main Business...
18
by: afromanam | last post by:
Whew.. OK, running access 2003 in win xpsp2 and access 2007 in win vista. This is the question... We have a db, split in front end (FE.mdb) and backend (BE.mdb) FE has tons of linked...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
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
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,...

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.