By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,825 Members | 2,437 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,825 IT Pros & Developers. It's quick & easy.

Microsoft access and Visual basic

P: 7
Hello everyone,

i am doing a project in taxation which i was working on it for 4 months. My program in excel and all the related forms are ready and formulated to carry the values and calculations.
I want the data input to be done in access form, and the data is being exported and saved in excel file, where tax forms are calling the values from the other excel file.

i do have few questions concerning access: (by the way i am not in computer or programing domain, i am finishing my masters in accounting and taxation).

1.. Is it possible to have iff expression in a form, that is when a field is being ticked(true or false)..can i have an IF expression, if lets say field1`is clicked, to open a form.

2..i know how to export the access form in excel, but can i export each form in one excel file but different sheets

thanks everyone
Jan 11 '12 #1
Share this Question
Share on Google+
3 Replies

Expert Mod 15k+
P: 31,489
One question per thread please (Rules).

Let me see if I can give you some direction here and if you need further help you can create a new thread for whatever this one doesn't centre on.
  1. No. That would be nothing to do with an IIf() function. It is possible to do though.
  2. This makes little sense. Forms hold no data as such, so cannot be exported per se. However, multiple datasets (tables and/or queries) can indeed be exported directly into specified worksheets in an existing (or otherwise) workbook file.
Jan 11 '12 #2

P: 7
Let me try to explain a little bit more to create of sense.

I have created tables and forms...One of the forms that i have is called INTRODUCTION (where the taxpayer is entering their infos in the fields like firstname, last name, SIN, date of birth etc...
i was able to create a macro to export this form into a excel spreadsheet.

One of my other tables are called INCOME where i have 6 questions to be ticked like
(tick ll that applies in your case)
1..had no income from any source
2.. employment income
3..pension income
4,,social assitance

lets say when the taxpayer reaches to this form and ticks whatever applies in their case. what i want to do is if a taxpayer ticks (employment income), id like to open the form of the box ticked so that they can enter the numbers and infos about their employment.

my question is what can be done to continue or proceed the way i am planning,,or what do you suggesst in return
Jan 11 '12 #3

Expert Mod 15k+
P: 31,489
Access VBA provides various events for forms and the controls on them. One such, for a control, is the AfterUpdate event. If you create an event procedure to handle this you can code it to check that the current (updated) value is True, and if it is run code to open the other form. remember though, that this will leave your original form still open and data unsaved.

i was able to create a macro to export this form into a excel spreadsheet.
I'd be interested to see the code as, even if this is possible, I struggle to think of a scenario where it would make sense (but people do strange things and Access often supports such abberrant behaviour).
Jan 11 '12 #4

Post your reply

Sign in to post your reply or Sign up for a free account.