Form/subform entry problem

B

Brian Snelling

Using Access 97 and WinXP. I have a form (in single form view) and a subform
in datasheet view. Somewhere along the line of revisions and changes I've
reached a state where data entry in either form locks out data entry to the
other. Is there some simple explanation or fix?
Thanks
Brian S.
 
J

John W. Vinson

Using Access 97 and WinXP. I have a form (in single form view) and a subform
in datasheet view. Somewhere along the line of revisions and changes I've
reached a state where data entry in either form locks out data entry to the
other. Is there some simple explanation or fix?
Thanks
Brian S.

Not without knowing more about the forms, no.

What are the Recordsources of the forms? Please post the SQL if it's a query.
Does either form have any associated VBA code? If so please post it.
 
B

Brian Snelling

Not without knowing more about the forms, no.

What are the Recordsources of the forms? Please post the SQL if it's a
query.
Does either form have any associated VBA code? If so please post it.

Thanks for the quick response.

Main form: frmDailyRecords is based on table tblDailyRecords

SQL: Combo box "cbxProjectID " Row source is: SELECT DISTINCTROW
tblProjects.ProjectID, tblProjects.ProjectName, tblProjects.ContractNumber,
tblCustomers.CustName, tblProjects.ProjectYear, tblProjects.CustomerID
FROM tblCustomers INNER JOIN tblProjects ON tblCustomers.CustomerID =
tblProjects.CustomerID;

Macros: There's a simple "Maximize" macro for On Current and Load events

Code: Private Sub Form_Load()
DoCmd.GoToRecord , , acLast
Exit_Form_Load:
Exit Sub
Err_Form_load:
MsgBox Err.Description
Resume Exit_Form_Load
End Sub

Also some simple code for Next, Previous and Close that worked fine in a
previous version of this form

Subform: fsubDailyRecordDetails is based on query qryDailyRecordDetails
(datasheet view)

Sql: SELECT tblDailyRecordDetails.DailyRecordDetailsID,
tblDailyRecordDetails.DailyRecordID, tblDailyRecordDetails.BlockID,
tblDailyRecordDetails.NoUnits, tblDailyRecordDetails.PaidBy,
tblDailyRecordDetails.Rate, tblBlocks.BlockNumber, tblBlocks.Location1,
tblBlocks.Location2, tblBlocks.SU, tblDailyRecordDetails.Piece,
[NoUnits]*[Rate] AS PartDayPay
FROM (qryProjects INNER JOIN tblBlocks ON qryProjects.ProjectID =
tblBlocks.ProjectID) INNER JOIN tblDailyRecordDetails ON tblBlocks.BlockID =
tblDailyRecordDetails.BlockID;

SQL for combo box "cbxBlockID": SELECT DISTINCT tblBlocks.BlockID,
tblBlocks.BlockNumber, tblBlocks.Location1, tblBlocks.Location2,
tblBlocks.SU, tblBlocks.ProjectID FROM tblBlocks WHERE
(((tblBlocks.ProjectID)=[Forms]![frmDailyRecords]![cbxProjectID]));
This combo box should show a dropdown list limited to blocks
associated with the Project chosen in the main form. I'm also having trouble
with this.

Code: none

SQL for "qryProjects" referred to above: SELECT tblProjects.ProjectID,
tblProjects.ProjectName, tblCustomers.CustName, tblProjects.ProjectYear,
tblProjects.CustomerID, tblProjects.ContractNumber, tblCustomers.CustActive
FROM tblCustomers INNER JOIN tblProjects ON tblCustomers.CustomerID =
tblProjects.CustomerID;

Hopefully this is enough info.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top