Almost there...
Still unable to pass ProgramID to DMax statement. Can I email a test file to you? Only 265K.
Problem lies in DMax statement. It works if I force Me.cboProgramID to be value I am looking for.
Private Sub cboProgramID_AfterUpdate()
' First Insert a New Record...
Please tell me how to do this in VBA. I need an example.
The default Add New Record is currently as follows:
Private Sub cmdAddDATARec_Click()
On Error GoTo Err_cmdAddDATARec_Click
DoCmd.GoToRecord , , acNewRec
Exit_cmdAddDATARec_Click:
Exit Sub
Err_cmdAddDATARec_Click:
MsgBox...
Where do I place this? I had placed it in the Default field value of the form for fldRecordNumber. If it needs to be in VBA how do I do this in combination of adding a new record?
=DMax("fldRecordNumber","tblRecord","[fldProgramID] = " & Program_Input)+1
The...
How can I allow a user to define the "fldProgramID" below within a form?
The following works but I must force the fldProgramID=1 to find the last record number and increment by 1 to insert a new record for a specific ProgramID. I do not want to use the Autoincrement since it is...
I need help in creating an autonumber like field.
Program_Name and Prg_Rec_No are composite primary keys.
Originally Prg_Rec_No was an autonumber field type and this was OK when the database was used for only one Program. Now it is to be used for multiple programs.
How can I auto-increment...
I need help in creating an autonumber like field.
Program_Name and Prg_Rec_No are composite primary keys.
Originally Prg_Rec_No was an autonumber field type and this was OK when the database was used for only one Program. Now it is to be used for multiple programs.
How can I auto-increment...
What I hope to do is this. Upon entering data for a new Program_Name, say "Program D", I would like Access to recogonize there are no pre-existing records of "Program D" and automatically create a new Task_ID to be "1".
Also, I need Access to recogonize upon...
I need help in creating an autonumber like field.
Program_Name and Task_ID are composite primary keys.
Originally Task_ID was an autonumber field type and this was OK since the database had only one Program. Now it is to be used for multiple programs.
How can I auto-increment the Task_ID...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.