help wite buutons code

eshai

Registered User.
Local time
Today, 07:02
Joined
Jul 14, 2015
Messages
195
Hello everyone
I have a question. I have an endpoint for students so they can report any faults in the compound
I want to build a form that contains buttons of a certain value so that a student clicks on the button
Is fed directly to the table and pass to the next form to another value table
Please help me
 
>>>Is fed directly to the table and pass to the next form to another value table<<<

Please clarify...
 
>>>Is fed directly to the table and pass to the next form to another value table<<<

Please clarify...

What I mean is that the field table will receive the value of a button
Then I will run a macro that saving, closing and opening the next form
 
When you say "button" do you mean an "option group" ?
 
When you say "button" do you mean an "option group" ?

no i mean simple button
and i need a code for it
i found that one

Code:
Dim rstCategories As Recordset
Set rstCategories = CurrentDb.OpenRecordset(Name:="Categories", Type:=RecordsetTypeEnum.dbOpenDynaset)
With rstCategories
    .AddNew
    ![Category Name] = "Better software"
    !Description = "5 star rated"
    .Update
End With


is this code good for me
 
Why the need to open another form? Why not do it record by record in a single form?
 
Why the need to open another form? Why not do it record by record in a single form?

There are more than 700 students
I can not do box list because there are too many values
I need every report ends in 4 clicks

Anyway the code I published works fine

Code:
Dim rstCategories As Recordset
Set rstCategories = CurrentDb.OpenRecordset(Name:="my table", Type:=RecordsetTypeEnum.dbOpenDynaset)
With rstCategories
    .AddNew
    ![field name]= "any value"
   
    .Update

End With

DoCmd.OpenForm FormName:="next form", View:=acNormal
 

Users who are viewing this thread

Back
Top Bottom