hello
my todays question is
how i can make continuous form with vba only ?
also
how i can add multi records in this continuous form.accdb and save them at the end?
Attachment 49594Attachment 49594Attachment 49594
hello
my todays question is
how i can make continuous form with vba only ?
also
how i can add multi records in this continuous form.accdb and save them at the end?
Attachment 49594Attachment 49594Attachment 49594
One way is with an UNBOUND form, lots of UNBOUND controls, and lots of code.
Another is input to a temp table and then 'move' records to permanent table.
Another is input to permanent table and then delete records if decide not to retain.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
You don’t need via, just set the form property.
another way is to bind the form to an ado disconnected recordset rather than a temp table
I'll give you an example - it is for you to do the work. Code something like this would be for a form for new entries and be placed in the form load event
here is a link to the different field typesCode:dim rs as object Set rs = CreateObject("ADODB.Recordset") With rs .Fields.Append "firstfieldname", 11 '11=boolean .Fields.Append "secondfieldname", 201, 255 '201 =memo/long text - second value is max number of characters .Fields.Append "thirdfieldname", 200, 255 ' 200 =advarchar (string) - second value is max number of characters allowed etc .CursorLocation = 3 'adUseClient .LockType = 3 'adLockOptimistic .CursorType = 3 'adOpenStatic Set Me.Recordset = rs end with Me.Recordset.MoveFirst
https://www.devguru.com/content/tech...ield-type.html
you then need code on your save button to save the entries to a table - I presume you already have something so code might be something like
Code:with me.recordset .movefirst while not .eof 'save the record to a table/exel/whatever .movenext wend
because I don't want to save records by mistake
vba give me the ability to control this
You can use a forms before update event to control that and save a world of pain trying to deal with code an unbound form.
Have a look here
https://www.access-programmers.co.uk...-and-2.324342/
DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
Please use the star below the post to say thanks if we have helped !
↓↓ It's down here ↓↓