Exporting current record

ibbledibble

Registered User.
Local time
Today, 01:47
Joined
Sep 29, 2008
Messages
59
Hi

I'd appreciate some advice on how to do this without resorting to VBA.

Simply, I want to output the current record displayed on a form to Excel. I thought of using SetValue to change a FLAG 'field' to 'Yes' and then using a query to pull up the record with this value set. Can't do it though.

I could run a Select query but don't know how to filter it to the current record.

Likewise I need a button to import an excel file into the database. If the record is new I could use an append query but if the record already exists on the database but has some updated fields how do I update the record? I need one command to do both, rather than select different imports depending on the data.

Thank you very much in advance.
 
Select the record using Record Selector, and then File > Export to *.xls. That will do what you what.

I assume each record has a unique ident. In which case you could have a WHERE function in your SQL statement.

SELECT <blah> FROM <blah>
WHERE = [<unique field name>]

Hope that helps, if not - sorry!
 
Is there not a query that can select the current record?
 
Is there not a query that can select the current record?
Not AFAIK. You could just build a normal query, then in criteria put [Forms]![frmYourFormName]![TheFieldOfYourPK] in the field [TheFieldOfYourPK] to make it select the current record.
 

Users who are viewing this thread

Back
Top Bottom