Newbie Needing Help

Lourensb

New member
Local time
Today, 22:28
Joined
May 30, 2009
Messages
1
Hi Guys, and Girls.

Lourens Here.

I am new to Access, and any DB for that matter.

I need some help, from some of the More experienced.

I want to create a DB that would assist me in my everyday work.

Here is what I want to accive, (Please tell me if this is Possible at all.)

We have a Series of Routers. 220, 420, 520, 1620 and 2620.
We have 2 x Upstream Service Providers, that we use, with 2 Central Routers in Each Upstream Provider.

Each Of the Central Routers, uses Different Values.

Ok, So this is what I want to Accive.

I want to Have a Stock List, with a List off all the Serial Numbers, that I have on hand.

Then, I want to Select a Serial Number, and Also Select the Upstream Provider, - Based on this Selection, Some of the Input fields, should Default to the Values for the Spesific Conditions.

At The end of the Day., I want to be able to See how many 220, 420 etc I have Left,. Maybe some Warning if Running Low...

And then also, I want to be Able to Look a Serial Number up,. and See the Configuration settings, for this Device.

Is this Possible ?

Also some of the Fields. need to Incriment Automatically to the Next Entry, But in even, and Uneven Numbers,. EG an IP Range for Field1 0.0.0.1 and Field 2 0.0.0.2

Then field 3 should be 0.0.0.3 and field 4 Should be 0.0.0.4

Etc.

Is anyone understanding what I am Asking here.

I would recon this is more than one Table, but not sure How to Relate them ?
 
Hi lourensb,

You have to get to the point more quickly.

the first part:
Yes, what you want is possible. Pleaase check out the sample northwind database which is provided by Microsoft in your Access installation.

the second part:
Also some of the Fields. need to Incriment Automatically to the Next Entry, But in even, and Uneven Numbers,. EG an IP Range for Field1 0.0.0.1 and Field 2 0.0.0.2

Then field 3 should be 0.0.0.3 and field 4 Should be 0.0.0.4
For lack of a better answer i would separate the IP adres into four number fields if you want to Increment separate fields.
Or you can write a function that does more or less the same thing:
Code:
Public function IncreaseIP(strIPAddress as string, intPart as integer, intIncrement as integer) as string
    dim arr() as integer

    arr = split(strIPAddress,".") 'Split the string into an array using dot as separator.

    if (arr(intPart-1) + intIncrement) >255 then 'cannot exceed 255
        arr(intPart-1)= 255
    else
        arr(intPart-1) = arr(intPart-1) + intIncrement
    endif

    IncreaseIP=join(arr,".")

end function
This code was not compiled.

HTH:D
 
Last edited:
Lourensb,

I agree fully that what you want to do can be accomplished using Access.

I also appreciate the detail that you provided about what you want to accomplish.

As for how to relate your tables, the best general advise that I can give is to think about how things are related in the real world and imulate that. If they are related one-to-one then relate them that way. If they are related one-to-many then create the relationship that way. Now, if many can be related to many then you really do have a many-to-many relationship, in which case you will need a third table to link the many on one side to the many on the other side. This is probably to most difficult relationship for people to recogonize and certainly the most difficult to implement.

Now, for the incrementing of the EG an IP Range. My initial thought is that you should define these fields as "text", not as numeric. You can then create an input mask that will force the entry of these values as you desire. Then to increment the values, you can simply create a user defined function that will break out each of the values that are seperated by a period and using a conversion function convert the text to a number, increment it as needed and then simply convert that number back to text.

As you get into your project, just post back with specific questions and I am sure that someone here will be able to assist.

HTH
 

Users who are viewing this thread

Back
Top Bottom