combobox - Access displaying first record when using combo box to switch records -


i have access database uses linked tables residing on sql server. 1 of these tables created simple form showing several fields of underlying table.

i want switch records using combo box, added 1 using combo box wizard, selected option "find record on form based on value selected in combo box".

the combo box works, noticed whenever new value selected, access briefly return first record before displaying selected record. can verify both noticing screen flicker (e.g., bound fields briefly display data first record), profiling calls sql server, can see 1 query first record, , query selected record.

this problem not occur if use next/previous navigation buttons @ bottom of form.

how can avoid unnecessary query?

what using wizard did create macro behind event of combobox click. looks .. , , first, ="[somefield] = " & str(nz(screen.activecontrol,0)) .. can do, instead of using macro, follow this

if @ macro (or arguments accepts), little more clear on why may experiencing behavior.

the first argument object type object name, record, offset.

  1. object type - type of object contains record want make current. click table, query, form, server view, stored procedure, or function in object type box in action arguments section of macro builder pane. leave argument blank select active object. <- yours left blank because you're referring combobox on form
  2. object name - name of object contains record want make current record. object name box shows objects in current database of type selected object type argument. if leave object type argument blank, leave argument blank also. <- because first left blank
  3. record - record make current record. click previous, next, first, last, go to, or new in record box. default next. <- this defaulted first me , possibly too, probably why seeing 'odd' behavior
  4. offset - integer or expression evaluates integer. expression must preceded equal sign (=). argument specifies record make current record. can use offset argument in 2 ways: when record argument next or previous, microsoft office access 2007 moves number of records forward or backward specified in offset argument. when record argument go to, access moves record number equal offset argument. record number shown in record number box @ bottom of window. note if use first, last, or new setting record argument, access ignores offset argument. if enter offset argument large, access displays error message. can't enter negative numbers offset argument.

i wish give more details, have not used access in conjunction sql server, if plays account not have insight.


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -