set db=currentdb()
set rs=db.openrecordset("Table A",dbopenforwardonly"
do while not rs.eof
debug.print rs!form
rs.movenext
loop
rs.close
set rs=nothing
set db=nothing[/tt]
If you're using access 2000+ try;
[tt]dim rs as adodb.recordset
set rs=new adodb.recordset
with rs
.activeconnection=currentproject.connection
.locktype=adlockreadonly
.cursortype=adopenforwardonly
.open "Table A", options:=adcmdtable
do while not .eof
debug.print !form
.movenext
loop
.close
end with
set rs=nothing[/tt]
NOTE - Don't use table or field names that might be confused with Access/VBA names - if the second field contains information about form names, name it FormName/FormDesc/fldForm - not "Form". It's also advicable not to use spaces in table, field, form, report.... names.
Since this is your first post, there are several Access specific forums. Do a forum search using "Access"... Also consider all forums have a faq-seqtion. Keyword search is also recommendable...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.