Hi.... I am a new to Access (1 month) and am stuck on a problem.
Table PermitType
5 Records with 2 fields
Example: RA, Residential Addition
Table PermitNum
1 Record with 5 fields
Example: RA,RG,RN,RO,RR
This table is used as a counter used for the number of Building Permits issued by type.
There is a combo box that looks up a Building Permit Type (2 Letters, i.e. RA, RG, RN, RO and RR) and the accompanying Descripition in Table "PermitType".
I am wanting to then take that 2 letter Building Permit Type (i.e. RA) and find the corresponding field in Table PermitNum and increment the corresponding value.
What is the correct syntax to use? See the bold area below.
Thanks so much in advance for any help on this. Hopefully I have made myself clear.
Oldguy
Dim Tempnum As Integer
Dim Strvar As String
' Assign Type Of Permit To Field Pnum_ptype (Lookup From Table PermitType)
[Pnum_ptype] = Combo15.Column(0)
' Assign Description Of Permit To Field Pnum_ptyped (Lookup From Table PermitType)
[Pnum_ptyped] = Combo15.Column(1)
' Assign Type Of Permit To Variable Strvar
Strvar = Combo15.Column(0)
Tempdb = "PermitNumTable"
Set dbs = CurrentDb()
Set Rst = dbs.OpenRecordset(Tempdb)
Rst.Edit
' Rst!??? = Rst!??? + 1 Here is where I need help !!!
Rst.Update
' ...... Additional Code Assigning Permit Number, etc....
Rst.Close
Set Rst = Nothing
Set db = Nothing
Table PermitType
5 Records with 2 fields
Example: RA, Residential Addition
Table PermitNum
1 Record with 5 fields
Example: RA,RG,RN,RO,RR
This table is used as a counter used for the number of Building Permits issued by type.
There is a combo box that looks up a Building Permit Type (2 Letters, i.e. RA, RG, RN, RO and RR) and the accompanying Descripition in Table "PermitType".
I am wanting to then take that 2 letter Building Permit Type (i.e. RA) and find the corresponding field in Table PermitNum and increment the corresponding value.
What is the correct syntax to use? See the bold area below.
Thanks so much in advance for any help on this. Hopefully I have made myself clear.
Oldguy
Dim Tempnum As Integer
Dim Strvar As String
' Assign Type Of Permit To Field Pnum_ptype (Lookup From Table PermitType)
[Pnum_ptype] = Combo15.Column(0)
' Assign Description Of Permit To Field Pnum_ptyped (Lookup From Table PermitType)
[Pnum_ptyped] = Combo15.Column(1)
' Assign Type Of Permit To Variable Strvar
Strvar = Combo15.Column(0)
Tempdb = "PermitNumTable"
Set dbs = CurrentDb()
Set Rst = dbs.OpenRecordset(Tempdb)
Rst.Edit
' Rst!??? = Rst!??? + 1 Here is where I need help !!!
Rst.Update
' ...... Additional Code Assigning Permit Number, etc....
Rst.Close
Set Rst = Nothing
Set db = Nothing