Is it possible to create new input objects on a form during runtime?

I've got some semblance of a working form prepared, just working on some little details before I'd be comfortable with posting a snip of it -- is it possible to change the background color of a single record in a continuous form? I.e. highlight the record that the current requery of the pests form reflects?

8318724388_cdbc4995cc_z.jpg
 
-- is it possible to change the background color of a single record in a continuous form?

I am using this as the basis for my selected record implementation:

Highlight Current Record in an Access Continuous Form
http://www.upsizing.co.uk/Art53_Highlight.aspx

I moved the bit of code which performs the shell game with switching colors off to a shared module / public function so that all forms share the same bit of code. That is, the LOC's within FormCurrent().

And I seem to recall having a bit of trouble with the instructions somewhere... I believe I had to hard code the color of the hidden field which is bound to the ID column, which was not in the instructions.

Anyway, a good starting point at least.
 
Is there any way to smoothly scroll a continuous form as opposed to scrolling by a whole record at a time?
 
Also, how do you keep the next (New) record from showing up in a continuous form until you want it - e.g. on a button click to a new record?
 
I do not see capabilities to prevent scrolling from stopping on whole records.

About limiting the new record row showing up... you should really design Multiple Items forms as read-only, and have separate forms to Add/Edit entries.Those would be unbound forms, use ADO type objects to connect between the form field controls and the database table. When opening an Edit form, perform a SELECT and map fields from the adoRS object to the form fields. When saving changes (COMMIT) then perform the correct INSERT / UPDATE reading forms fields back into VBA variables / plugging them into ADO.Parameters objects to head back to the database. You can even perform data validation in-between reading the form fields and sending the data to the database.

Here are some helpful posts for such:

Client/Server Architecture
http://www.access-programmers.co.uk/forums/showpost.php?p=1110794&postcount=5

Example of SQL INSERT / UPDATE using ADODB.Command and ADODB.Parameters objects to Access tables
http://www.access-programmers.co.uk/forums/showthread.php?t=219149

Example of SQL SELECT using ADODB.Command and ADODB.Parameters objects to Access tables
http://www.access-programmers.co.uk/forums/showthread.php?t=230610#post1176746

Safely read form field text controls
http://www.access-programmers.co.uk/forums/showthread.php?p=1131039#post1131115
 

Users who are viewing this thread

Back
Top Bottom