First time actually using Access to access data. (eg forms and reports)
Using Access 2000
Need some guidence with a database i'm designing on tracking jobs and their shipping dates
I have Table1 with Fields: JobID (PK), SubDivID (PK), Type, ShipID (FK), InvoiceID (FK)
I have Table2 with Fields: ShipID (PK), ShipFloor (PK) Shipper, ShipDate
I made a form that when I enter in JobID and SubDivID it creates the ShipID and InvoiceID from both the JobID & SubDivID and adds a suffex (eg JobID L64; SubDivID PT; becomes L64PT-shp for ShipID)
First question: Is this a good design practice to do this.
Second question: Is this a good way to code what I did: (should i use a command button? other suggestions?) It works but think it can have flaws.
Expand|Select|Wrap|Line Numbers
- Private Sub JobID_Change()
- strJobID = Me.JobID.Text
- intJobIDb = 1
- intJobIDi = 1
- intJobIDs = 1
- End Sub
- Private Sub ShipID_GotFocus()
- If intJobIDs = 1 And intSubDIDs = 1 Then
- Me.ShipID.Text = strJobID + strSubDivID & "-shp"
- intJobIDs = 0
- intSubDIDs = 0
- End If
- End Sub
- Private Sub SubDivID_Change()
- intChange = 1
- End Sub
- Private Sub SubDivID_LostFocus()
- If intChange = 1 Then
- strSubDivID = Me.SubDivID.Text
- intSubDIDb = 1
- intSubDIDi = 1
- intSubDIDs = 1
- intChange = 0
- End If
- End Sub
Thanks for the Help,