7 Replies - 2763 Views - Last Post: 17 October 2010 - 08:50 PM Rate Topic: -----

#1 chowellatc  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 16-October 10

Logbook Program

Posted 16 October 2010 - 09:33 PM

Hello Everyone,

First off let me say this is for my personal use not for homework or anything like thta. I am a pilot and I am looking to create a database type program (guessing VB or Access???)that will allow me to input my flight information (see link this link for an example program)and to be able to pull that information up for later viewing and to create a report of maybe something like my monthly and yearly flying.

I have basically created a spreadsheet that works but it looks boring. I am looking at creating something like a simple looking form that I will enter my flight information and then be able to pull that data back out off a database to be able to search by day, month, etc.

I have had both a access and VB class at a local community college but thats been about 3 years ago. I remember some of the things but not all. I do have both books from the class as a reference (nothing really deals with what I am looking to do). I know I can buy a logbook program but what fun will that be???

Here is an example of something I am looking at creating (its a virtual interaction)

I am not looking for someone to do it for me, just to help me get started in the best way to do this and the basic of how to do it.

Thanks in Advance!
-Caleb

Is This A Good Question/Topic? 0
  • +

Replies To: Logbook Program

#2 maj3091  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 303
  • View blog
  • Posts: 1,796
  • Joined: 26-March 09

Re: Logbook Program

Posted 17 October 2010 - 01:11 AM

I think you have two options here depending on how you want to do it.

If you have an excel spreadsheet that works for you already and you want to spruce it up, you could look at using VBA (Visual Basic for Applications) and create forms etc., to make your spreadsheet look good.

If you really want to go down the Access route, then I would suggest a good place to start would be the tutorials section both in VB and Databases. There you should find a range of tutorials to get you started.

Once you've made a start, feel free to post back with any issues and I'm sure people will be happy to help.
Was This Post Helpful? 0
  • +
  • -

#3 guyfromri  Icon User is offline

  • D.I.C Addict

Reputation: 46
  • View blog
  • Posts: 819
  • Joined: 16-September 09

Re: Logbook Program

Posted 17 October 2010 - 06:27 AM

If it were me..I would do the following


1. Create an Access DB then a Table with all the fields you want to log
2. Create a Form to enter information to the table. Each text box should correspond with a column in the table.
3. Create a separate form or button with in the first form that allows you to search records in your table.


Really....to make this easy...start off with basic information then once you have a working program and some good progress, you can add fields to your table and functions to your form. Come back with code questions and we'll all be happy to help :)

Hope this puts some perspective on it for you :) :) :) :)
Was This Post Helpful? 0
  • +
  • -

#4 chowellatc  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 16-October 10

Re: Logbook Program

Posted 17 October 2010 - 12:27 PM

Thanks everyone! Would there be a way to be able to create something like this (I know several pilots wanting something like this)where you dont have to have access or vb basic to run it? Basically I create it and save it to run like a program so others can use it?

I know I may be going to far abut how hard would this be to create to use on a webpage that way I can add or modify it from anywhere (maybe using mySQL?).

The overall principle i would like to do is simple the complex part is once I input the information; is to get it to do the calculations based on what information I put in. (ex. Lets see if I can explain this...Let say I fly N12345 a Cessna 172 for 1.5 hrs and I was flying as PIC(Pilot In Command). I input that information into the form/program...then based on what I put in from the given information it fills in the other calculations...ex. Every time I fly in N12345 it adds the time I flew(in this example 1.5 hrs) to a Single Egine Column because its a single engine, and that it adds that time to a column for PIC, and so on. I know this sounds confusing but I am not very good at explain (lol sorry). I have been able to to what want in Excel but it looks to complex I would like something more simple looking so other pilots can use it. I would attach a copy of it but it is to large to use as an attachment (16MB).
Was This Post Helpful? 0
  • +
  • -

#5 chowellatc  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 16-October 10

Re: Logbook Program

Posted 17 October 2010 - 12:43 PM

Is there a way I can Create a Form/Program that will communicate with Excel?

So basically I create a form asking all the information and then it will take that information and place it in the corresponding cell in excel (That way excel is doing all the calculations)?

Ex. "Date" entry in the form will input information entered into the "Date" Cell in the excel form...and so on...
Was This Post Helpful? 0
  • +
  • -

#6 guyfromri  Icon User is offline

  • D.I.C Addict

Reputation: 46
  • View blog
  • Posts: 819
  • Joined: 16-September 09

Re: Logbook Program

Posted 17 October 2010 - 01:54 PM

View Postchowellatc, on 17 October 2010 - 01:43 PM, said:

Is there a way I can Create a Form/Program that will communicate with Excel?

So basically I create a form asking all the information and then it will take that information and place it in the corresponding cell in excel (That way excel is doing all the calculations)?

Ex. "Date" entry in the form will input information entered into the "Date" Cell in the excel form...and so on...


Open Excel

While holding down "Alt" Press "F11" "I" "U"

This will create a form that you can use. Then you can pick a sheet and enter the columns/rows you want and code the form to update those columns/rows accordingly. Again though, this will require VBA

This is actually pretty easy practice. The code would be similar to

sub cmd1_click

if me.lblDate<>"" then sheets("MainSheet").cells("A1")=me.lblDate.value

end sub



This would update the same cell all the time, if you had a column or row that you wanted to retain the dates in order entered then you would code it like

Sub cmd1_Click

dim x as long
dim y as long

x=activesheet.usedrange.rows.count+1

for y=1 to x

   range("A" & x).select 'This is where you would find the next blank cell

   if me.lblDate<>"" then sheets("MainSheet").cells("A1")=me.lblDate.value
next x

end sub




These aren't perfect but they're good examples that would accomplish what you want to do here. With what you're looking for, there is definitely a way to do it.Hope this helps :)

This post has been edited by guyfromri: 17 October 2010 - 02:01 PM

Was This Post Helpful? 0
  • +
  • -

#7 chowellatc  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 16-October 10

Re: Logbook Program

Posted 17 October 2010 - 06:56 PM

Thanks for your help so far!

Im a little confused. I got the VB form up and created a textbox to enter the data. Heres what I got...

In the excel document I have the 1st "Date" cell at A5. Im trying to get what I input in the textbox in VB for date to appear in A5 in the excel document. Then on the next record the Date will be on cell A6 and so on...

Any ideas?

Here is a link to my Excel Sheet so you can see what I am working with (16MB)

Some of the cells are locked so if I give it to other pilots (like this copy) they will not erase the code/formula that makes it work. The password to unlock the workbook is "LOGBOOK"
Was This Post Helpful? 0
  • +
  • -

#8 guyfromri  Icon User is offline

  • D.I.C Addict

Reputation: 46
  • View blog
  • Posts: 819
  • Joined: 16-September 09

Re: Logbook Program

Posted 17 October 2010 - 08:50 PM

View Postchowellatc, on 17 October 2010 - 07:56 PM, said:

Thanks for your help so far!

Im a little confused. I got the VB form up and created a textbox to enter the data. Heres what I got...

In the excel document I have the 1st "Date" cell at A5. Im trying to get what I input in the textbox in VB for date to appear in A5 in the excel document. Then on the next record the Date will be on cell A6 and so on...

Any ideas?

Here is a link to my Excel Sheet so you can see what I am working with (16MB)

Some of the cells are locked so if I give it to other pilots (like this copy) they will not erase the code/formula that makes it work. The password to unlock the workbook is "LOGBOOK"


Although there's no code, that's a good effort so here's something to get you going

Hold "ALT" Press "F11" "I" "M"

Paste the following

    
'This set up to be pasted in a module and run as a subroutine. _
If you want to transition this to a form, paste the code to a button _
then change "InputBox" to the Label Name that you're entering the date in


Sub testdate()

Dim x As String
Dim y As Long
Dim z As Long

x = InputBox("Please enter your date")
    If x = "" Then End
    
y = Range("A65536").End(xlUp).Row + 1 'This will select the next empty row

For z = 5 To y 'This will ensure you start at 5 and not 2
    Range("A" & z) = Format(DateValue(x), "MM/DD/YYYY") 'This can be changed to suit
Next z

End Sub




Hope it helps :)

This post has been edited by guyfromri: 17 October 2010 - 08:51 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1