E
elyse
Hello,
When I try to run the following code:
Dim rec1 As Recordset
Dim dbs1 As Database
Set dbs1 = CurrentDb
Set rec1 = dbs1.OpenRecordset("GTGrantApplInfo")
With rec1
..AddNew
!Grant_Number = Me![Grant_Number]
!Appl_Recvd_Date = Me![Appl_Recvd_Date]
!Grantee_Number = Me![Grantee_Number]
!GS_Empl_Num = Me![GS_Empl_Num]
!PS_Empl_Num = Me![PS_Empl_Num]
!Notes = Me![Notes]
!Gabi_Disk_Recvd = Me![Gabi_Disk_Recvd]
!Act_Type_Num = Me![Act_Type_Num]
!Prog_Off_Num = Me![Prog_Off_Num]
!Program_Type_Code = Me![Program_Type_Code]
!Period_Year = Me![Period_Year]
!Funding_Per_Begin = Me![Funding_Per_Begin]
!Funding_Per_End = Me![Funding_Per_End]
..Update
End With
I keep getting a Type Mismatch error at line ( Set rec1 =
dbs1.OpenRecordset("GTGrantApplInfo")
The table name used to be GT_Grant_Appl_Info, so I removed the (underscores)
and created one word. I then tried to remove the " , but the table wasn't
recognized by the code. I'm not sure what else to do. Please help
Thanks in advance
When I try to run the following code:
Dim rec1 As Recordset
Dim dbs1 As Database
Set dbs1 = CurrentDb
Set rec1 = dbs1.OpenRecordset("GTGrantApplInfo")
With rec1
..AddNew
!Grant_Number = Me![Grant_Number]
!Appl_Recvd_Date = Me![Appl_Recvd_Date]
!Grantee_Number = Me![Grantee_Number]
!GS_Empl_Num = Me![GS_Empl_Num]
!PS_Empl_Num = Me![PS_Empl_Num]
!Notes = Me![Notes]
!Gabi_Disk_Recvd = Me![Gabi_Disk_Recvd]
!Act_Type_Num = Me![Act_Type_Num]
!Prog_Off_Num = Me![Prog_Off_Num]
!Program_Type_Code = Me![Program_Type_Code]
!Period_Year = Me![Period_Year]
!Funding_Per_Begin = Me![Funding_Per_Begin]
!Funding_Per_End = Me![Funding_Per_End]
..Update
End With
I keep getting a Type Mismatch error at line ( Set rec1 =
dbs1.OpenRecordset("GTGrantApplInfo")
The table name used to be GT_Grant_Appl_Info, so I removed the (underscores)
and created one word. I then tried to remove the " , but the table wasn't
recognized by the code. I'm not sure what else to do. Please help
Thanks in advance