473,383 Members | 1,885 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

e-mail Current Form Record as a Report & Menu Solutions

21
Right I'm don't feel so nervous tackling VB as much now but basic stuff I'm great with so the next part of my script is:

1. Having a Front Menu. When you enter the number 1 in a textfield it selects formA, number 2 selects formB etc how would I do this?

2. E-mail Current Form Record. I found a similar thread to this but I used its code and it didn't work anyone got any ideas, I've managed to create one for Printing but not mailing any help would be appreciated!
Dec 22 '07 #1
5 1717
Nathan H
104 100+
Right I'm don't feel so nervous tackling VB as much now but basic stuff I'm great with so the next part of my script is:

1. Having a Front Menu. When you enter the number 1 in a textfield it selects formA, number 2 selects formB etc how would I do this?

2. E-mail Current Form Record. I found a similar thread to this but I used its code and it didn't work anyone got any ideas, I've managed to create one for Printing but not mailing any help would be appreciated!

Mark,

Something along this line would work for question 1.

This takes the value in a text box (txt1) and selects a form based on the value. I put this code on a command button

[Code = vb]
Private Sub Command0_Click()
If txt1 = "1" Then DoCmd.OpenForm "FormA"
If txt1 = "2" Then DoCmd.OpenForm "FormB"
End Sub
[/code]

Nathan
Dec 23 '07 #2
Marks
21
Mark,

Something along this line would work for question 1.

This takes the value in a text box (txt1) and selects a form based on the value. I put this code on a command button

[Code = vb]
Private Sub Command0_Click()
If txt1 = "1" Then DoCmd.OpenForm "FormA"
If txt1 = "2" Then DoCmd.OpenForm "FormB"
End Sub
[/code]

Nathan
Thanks Nathan, I stuck it it as onEnter instead of a Command Button and it works like a charm :) Many thanks and Merry Christmas :D
Dec 24 '07 #3
missinglinq
3,532 Expert 2GB
The OnEnter of what? Be aware that OnEnter will only fire if your user(s) tab into a control, not if they use the mouse and click into it. OnEnter events really should only be used to do things related to that particular control, not to fire code for such things as opening forms. If you always want a form to open when you enter data into txt1, it's AfterUpdate event would be more appropriate.

As for the emailing problem, you ought to post the code that you've tried.

Linq ;0)>
Dec 25 '07 #4
Marks
21
REF: e-mail Current Form Record as a Report

I've deleted the code because it was just being way to messy so if anyone has a code from scratch that would be fantastic :)
Jan 2 '08 #5
Marks
21
Found solution to this just had to modify the code a little
Mar 17 '08 #6

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

Similar topics

3
by: sea | last post by:
I need to be able to print the current form because the form has an embedded object of a .gif file, so report will not work -- does anyone know the way to do this? I tried some code, not sure what...
3
by: Simone | last post by:
Hi, I'm a DB newbie and I've been having issues trying to print the record I am viewing in a form to a report. I have looked in groups all over and they all say to try basically the same thing...
0
by: Sumit | last post by:
Hi, I have a MDI Windows form. I have a menu bar on the from. The requirement is that the menu items that i put in the menu bar should come in the normal way (i.e start from left to right or say...
16
by: usenet | last post by:
I want to be able to use the record numbers of a sub-form, are they available anyhow in VB (Access 2003)? I want to use the sub-form record number as *part* of the primary key for the table...
3
by: Deacon Dan | last post by:
I want to be able to keep the current form on the current record. That is, the arrow key, the tab or the enter should not cause the form to go to next record or previous record. Preferably loop...
4
by: gary.cobden | last post by:
Hi I have a form/subform where a new record is created on the subform by a button click. After the new record is created, I then need to go directly and display the new record in the subform....
2
by: herbiegrey | last post by:
Hello This is my first post on the forum so hello everyone. I have a problem with access that I can't manage to view the current form record as a report ready to be printed. I have a list...
9
Microblitz
by: Microblitz | last post by:
Two weeks (Well about 8 hours actually) into writing VBA code and I've run up against a problem. This is the senario; ---- I have a "Main" form in which an entry on a drop down selects one of...
0
Knut Ole
by: Knut Ole | last post by:
Hi, I have a mainform for a new camping reservation, with a subform for entering a new contact upon making a new reservation. I also have a subform for editing a contact on-the-run when making a new...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.