MS Access - Ticking record checkbox on pressing a button -


i using access 2003

i have form lists several payment records, main fields paid , bank says paid, textbox showing difference , checkbox see if payment processed.

normally user have manually @ difference field tag each record processing , press 'commit'.

i want automate process pressing button records difference = 0 automatically selected, users needs press 'commit'.

it sounds me need update field behind checkbox , not checkbox itself. here's idea:
if looking simple solution such putting command button on form , running procedure updates checkboxes like:

  • create command button
  • place somewhere on form (maybe header or footer)
  • give logical name
  • select buttons properties >> events >> on click >> event procedure
    ...and can simple following

.

'option compare database 'option explicit  '***update checkbox (yes\no field) depending on value of field*** 'table name:tblpayments 'field name:difference 'checkbox field name: tobeprocessed  private sub cmdupdaterecords_click()  dim rstmytable dao.recordset 'your table dim strsql string    'your sql  'an sql string based on checkbox want update , field assessing strsql = "update tblpayments set tblpayments.tobeprocessed = iif([difference]=0,true);"  'execute sql currentdb.execute strsql  'kill object if isobject(rstmytable) set rstmytable = nothing me.requery  end sub 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -