P
Paulo Norberto
Hello,
I am using Access 2007 ADP and SQL 2005
I have a table named tblA. This table has the fields A1, A2, A3. Field A1
has a “Data Type†of “intâ€, Identity increment of “1â€, is indexed (no
duplicates). Field A2 and A3 have a “Data Type†of “char†but they have no
problem.
I have a table named tblB. This table has the fields B1, B2, B3 and B4.
Field B1 has a “Data Type†of “intâ€, “Identity increment†of “1â€, is indexed
(no duplicates). Field B2 has a “Data Type†of “intâ€, do not have “Identity
incrementâ€, is indexed (duplicates OK).Field B3 has a “Data Type†of “charâ€
and B4 has a “Data Type†of “datetime†but they have no problem.
I have the query qryA as follow:
SELECT dbo. tblB.B1, dbo. tblB.B2, dbo. tblA.A2, dbo._ tblA.A3, dbo.
tblB.B3, dbo. tblB.B4
FROM dbo. tblA INNER JOIN
dbo. tblB ON dbo. tblA.A1 = dbo. tblB.FacturaCliID
I have a form to input data on table tblB with:
Record Source: qryA
Record Source Qualifier: dbo
Recordset Type: Updatable Snapshot
Unique Table: tblB
On this form the control B2 is a “Combo Box†with:
Control Source: B2
Row Source :
SELECT A1, A2
FROM tblA
ORDER BY A2
Row Source Type: Table/View/StoredProc
Bound column: 1
Column Count: 2
Column Widths: 0 cm; 5 cm
When I select a value in the “Combo Box†B2 I want that the bound “Text Boxâ€
A2 and A3 displays the corresponding values of the record selected in the
“Combo Box†B2 before the record has saved and the bound “Text Box†B1 gets
its auto number.
Until now I only get this if I save the record. There is any way that I can
display those two fields in a form before I save the record?
The reason that I need it is because I have five users doing the same work
on separated places and sometimes one of them needs to cancel the record
after see the results displayed in the “Text Box†A2 and A3. If the record
was preview saved it has to be deleted and the auto number will be lost. This
auto number Field B1 is used as Invoice number and we must not have jumps in
the sequence.
Thank you,
Paulo Norberto
I am using Access 2007 ADP and SQL 2005
I have a table named tblA. This table has the fields A1, A2, A3. Field A1
has a “Data Type†of “intâ€, Identity increment of “1â€, is indexed (no
duplicates). Field A2 and A3 have a “Data Type†of “char†but they have no
problem.
I have a table named tblB. This table has the fields B1, B2, B3 and B4.
Field B1 has a “Data Type†of “intâ€, “Identity increment†of “1â€, is indexed
(no duplicates). Field B2 has a “Data Type†of “intâ€, do not have “Identity
incrementâ€, is indexed (duplicates OK).Field B3 has a “Data Type†of “charâ€
and B4 has a “Data Type†of “datetime†but they have no problem.
I have the query qryA as follow:
SELECT dbo. tblB.B1, dbo. tblB.B2, dbo. tblA.A2, dbo._ tblA.A3, dbo.
tblB.B3, dbo. tblB.B4
FROM dbo. tblA INNER JOIN
dbo. tblB ON dbo. tblA.A1 = dbo. tblB.FacturaCliID
I have a form to input data on table tblB with:
Record Source: qryA
Record Source Qualifier: dbo
Recordset Type: Updatable Snapshot
Unique Table: tblB
On this form the control B2 is a “Combo Box†with:
Control Source: B2
Row Source :
SELECT A1, A2
FROM tblA
ORDER BY A2
Row Source Type: Table/View/StoredProc
Bound column: 1
Column Count: 2
Column Widths: 0 cm; 5 cm
When I select a value in the “Combo Box†B2 I want that the bound “Text Boxâ€
A2 and A3 displays the corresponding values of the record selected in the
“Combo Box†B2 before the record has saved and the bound “Text Box†B1 gets
its auto number.
Until now I only get this if I save the record. There is any way that I can
display those two fields in a form before I save the record?
The reason that I need it is because I have five users doing the same work
on separated places and sometimes one of them needs to cancel the record
after see the results displayed in the “Text Box†A2 and A3. If the record
was preview saved it has to be deleted and the auto number will be lost. This
auto number Field B1 is used as Invoice number and we must not have jumps in
the sequence.
Thank you,
Paulo Norberto