Ask a Question related to Microsoft Access, Design and Development.
-
Charlie #1
Stop adding record in subform after record count = 1
Can someone help in in what to put after the THEN statment to allow one
entry if the Record count is =>1 in the Before insert or should I set the
probert after the first entry?
This code is in Before insert event in Sub Form
Private Sub Form_BeforeInsert(Cancel As Integer) ' This goes in subform "b"
If Me.CurrentRecord = 2 And Forms![MainForm].[Field in Main Form] =
"variable"
Then
Cancel = True '??????
MsgBox "You can only have one invoice per bob entry", vbInformation,
"Data Error"
End If
'From here I want to go back to the form as if I only have
one entry now and sitting as if I just called it up.
End Sub
Thank You
Charlie
Charlie Guest
-
Adding a new record when the record source is a query.
Hello All, I have a form that runs a query. The reason it runs on a query is because prior to it opening I have a form from which you can pick... -
delete subform record
Hi, can anyone tell me the best way to delete the current record in a subform, using a command button on a mainform? I know this should be easy,... -
Save record in subform
I do a after update event in a field in a subform (multiple payments to a job). Then I have it requery to calculate the balance due. When I do the... -
Go to record in a subform
This example assumes the subform contains a field named "OrderID", and uses the RecordsetClone of the subform to get the value from the last record.... -
Changing the subform per record
As a workaround I've simply put subform A and B into the main form. Depending on the record one of the two is now enabled. I guess that's the...



Reply With Quote

